You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
4.3 KiB
84 lines
4.3 KiB
<Styles |
|
xmlns="https://github.com/avaloniaui" |
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
xmlns:controls="using:StabilityMatrix.Avalonia.Controls" |
|
xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData" |
|
xmlns:system="clr-namespace:System;assembly=System.Runtime" |
|
xmlns:ui="using:FluentAvalonia.UI.Controls" |
|
xmlns:vmInference="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Inference" |
|
x:DataType="vmInference:ImageGalleryCardViewModel"> |
|
|
|
<Design.PreviewWith> |
|
<Grid Width="512" Height="512"> |
|
<controls:ImageGalleryCard DataContext="{x:Static mocks:DesignData.ImageGalleryCardViewModel}" /> |
|
</Grid> |
|
</Design.PreviewWith> |
|
|
|
<Style Selector="controls|ImageGalleryCard"> |
|
<!-- Set Defaults --> |
|
<Setter Property="Template"> |
|
<ControlTemplate> |
|
<controls:Card |
|
Padding="8" |
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}" |
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"> |
|
<Grid Margin="4" ColumnDefinitions="Auto,*,Auto"> |
|
<Button |
|
Grid.Column="0" |
|
Margin="4" |
|
Padding="10,20" |
|
VerticalAlignment="Center" |
|
Command="{Binding #ImageCarousel.Previous}"> |
|
<Path Data="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" Fill="Black" /> |
|
</Button> |
|
<Panel Grid.Column="1"> |
|
<Carousel |
|
Name="ImageCarousel" |
|
IsVisible="{Binding !IsPreviewOverlayEnabled}" |
|
ItemsSource="{Binding ImageSources}"> |
|
<Carousel.PageTransition> |
|
<CompositePageTransition> |
|
<PageSlide Orientation="Horizontal" Duration="0.167"> |
|
<PageSlide.SlideInEasing> |
|
<QuadraticEaseIn /> |
|
</PageSlide.SlideInEasing> |
|
<PageSlide.SlideOutEasing> |
|
<SineEaseInOut /> |
|
</PageSlide.SlideOutEasing> |
|
</PageSlide> |
|
<CrossFade Duration="0.1" /> |
|
</CompositePageTransition> |
|
</Carousel.PageTransition> |
|
<Carousel.ItemTemplate> |
|
<DataTemplate DataType="{x:Type system:String}"> |
|
<controls:BetterAdvancedImage |
|
CornerRadius="4" |
|
Source="{Binding}" |
|
Stretch="Uniform" |
|
StretchDirection="Both" /> |
|
</DataTemplate> |
|
</Carousel.ItemTemplate> |
|
</Carousel> |
|
<Border |
|
IsVisible="{Binding IsPreviewOverlayEnabled}" |
|
ClipToBounds="True" CornerRadius="4"> |
|
<Image |
|
Source="{Binding PreviewImage}" |
|
Stretch="Uniform" |
|
StretchDirection="Both" /> |
|
</Border> |
|
</Panel> |
|
<Button |
|
Grid.Column="2" |
|
Margin="4" |
|
Padding="10,20" |
|
VerticalAlignment="Center" |
|
Command="{Binding #ImageCarousel.Next}"> |
|
<Path Data="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" Fill="Black" /> |
|
</Button> |
|
</Grid> |
|
</controls:Card> |
|
</ControlTemplate> |
|
</Setter> |
|
</Style> |
|
</Styles>
|
|
|