96 lines
4.4 KiB
XML
96 lines
4.4 KiB
XML
<ResourceDictionary
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:controls="using:Toolkit.UI.Controls.Avalonia">
|
|
<Design.PreviewWith>
|
|
<Border Padding="20" />
|
|
</Design.PreviewWith>
|
|
<ControlTheme x:Key="{x:Type controls:CarouselView}" TargetType="controls:CarouselView">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<Grid x:Name="Container" Background="{TemplateBinding Background}">
|
|
<Border HorizontalAlignment="Left">
|
|
<controls:CarouselViewItem />
|
|
</Border>
|
|
<Border HorizontalAlignment="Left">
|
|
<controls:CarouselViewItem />
|
|
</Border>
|
|
<Border HorizontalAlignment="Left">
|
|
<controls:CarouselViewItem />
|
|
</Border>
|
|
<Border HorizontalAlignment="Left">
|
|
<controls:CarouselViewItem />
|
|
</Border>
|
|
<Border HorizontalAlignment="Left">
|
|
<controls:CarouselViewItem />
|
|
</Border>
|
|
<Rectangle
|
|
x:Name="Indicator"
|
|
Width="10"
|
|
Height="10"
|
|
VerticalAlignment="Top" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
</ControlTheme>
|
|
<ControlTheme x:Key="{x:Type controls:CarouselViewItem}" TargetType="controls:CarouselViewItem">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<ContentPresenter
|
|
x:Name="Content"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
FontFamily="{StaticResource ContentControlThemeFontFamily}"
|
|
FontSize="{StaticResource ControlContentThemeFontSize}"
|
|
Foreground="{TemplateBinding Foreground}" />
|
|
</ControlTemplate>
|
|
</Setter>
|
|
<Style Selector="^:selected /template/ ContentPresenter#Content">
|
|
<Style.Animations>
|
|
<Animation FillMode="Forward" Duration="00:00:00.500">
|
|
<KeyFrame Cue="0%">
|
|
<Setter Property="Opacity" Value="0.4" />
|
|
</KeyFrame>
|
|
<KeyFrame Cue="100%">
|
|
<Setter Property="Opacity" Value="1.0" />
|
|
</KeyFrame>
|
|
</Animation>
|
|
<Animation FillMode="Forward" Duration="00:00:00.500">
|
|
<KeyFrame Cue="0%">
|
|
<Setter Property="ScaleTransform.ScaleX" Value="0.9" />
|
|
<Setter Property="ScaleTransform.ScaleY" Value="0.9" />
|
|
</KeyFrame>
|
|
<KeyFrame Cue="100%" KeySpline="0,0 0,1">
|
|
<Setter Property="ScaleTransform.ScaleX" Value="1.0" />
|
|
<Setter Property="ScaleTransform.ScaleY" Value="1.0" />
|
|
</KeyFrame>
|
|
</Animation>
|
|
</Style.Animations>
|
|
</Style>
|
|
<Style Selector="^:not(:selected) /template/ ContentPresenter#Content">
|
|
<Style.Animations>
|
|
<Animation FillMode="Forward" Duration="00:00:00.500">
|
|
<KeyFrame Cue="0%">
|
|
<Setter Property="Opacity" Value="1.0" />
|
|
</KeyFrame>
|
|
<KeyFrame Cue="100%">
|
|
<Setter Property="Opacity" Value="0.4" />
|
|
</KeyFrame>
|
|
</Animation>
|
|
<Animation FillMode="Forward" Duration="00:00:00.500">
|
|
<KeyFrame Cue="0%">
|
|
<Setter Property="ScaleTransform.ScaleX" Value="1.0" />
|
|
<Setter Property="ScaleTransform.ScaleY" Value="1.0" />
|
|
</KeyFrame>
|
|
<KeyFrame Cue="100%" KeySpline="0,0 0,1">
|
|
<Setter Property="ScaleTransform.ScaleX" Value="0.9" />
|
|
<Setter Property="ScaleTransform.ScaleY" Value="0.9" />
|
|
</KeyFrame>
|
|
</Animation>
|
|
</Style.Animations>
|
|
</Style>
|
|
</ControlTheme>
|
|
</ResourceDictionary>
|