LANCommander/LANCommander.Launcher/Views/Components/Cover.axaml

41 lines
2 KiB
Text
Raw Permalink Normal View History

2026-04-19 12:55:23 -05:00
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="using:LANCommander.Launcher.Views.Components"
2026-04-19 12:55:23 -05:00
mc:Ignorable="d" d:DesignWidth="160" d:DesignHeight="240"
x:Class="LANCommander.Launcher.Views.Components.Cover">
2026-04-19 12:55:23 -05:00
<Border HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
CornerRadius="0"
ClipToBounds="True">
<Panel>
<Image x:Name="CoverImage"
Stretch="UniformToFill"
IsVisible="{Binding HasCover, RelativeSource={RelativeSource AncestorType=local:Cover}}" />
<Border IsVisible="{Binding !HasCover, RelativeSource={RelativeSource AncestorType=local:Cover}}">
<Border.Background>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,100%">
<GradientStop Color="#3D1A6B" Offset="0" />
<GradientStop Color="#0F3460" Offset="1" />
</LinearGradientBrush>
</Border.Background>
<TextBlock Text="{Binding Title, RelativeSource={RelativeSource AncestorType=local:Cover}}"
FontSize="{Binding FallbackFontSize, RelativeSource={RelativeSource AncestorType=local:Cover}}"
FontWeight="SemiBold"
TextWrapping="Wrap"
TextAlignment="Center"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10"
Foreground="White" />
</Border>
<ContentPresenter Content="{Binding Overlay, RelativeSource={RelativeSource AncestorType=local:Cover}}" />
</Panel>
</Border>
</UserControl>