feat: simplify template
This commit is contained in:
parent
0bf7168cba
commit
2ec97c023f
@ -90,15 +90,21 @@
|
|||||||
<ControlTemplate TargetType="ListBoxItem">
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
<Panel Background="Transparent">
|
<Panel Background="Transparent">
|
||||||
<Border Padding="2,0" Background="Transparent">
|
<Border Padding="2,0" Background="Transparent">
|
||||||
<Canvas Width="{DynamicResource CarouselIndicatorColumnarWidth}"
|
<Border Width="{DynamicResource CarouselIndicatorColumnarWidth}"
|
||||||
Height="{DynamicResource CarouselIndicatorColumnarSelectedHeight}">
|
Height="{DynamicResource CarouselIndicatorColumnarSelectedHeight}">
|
||||||
<Rectangle
|
<Rectangle
|
||||||
Name="Container"
|
Name="Container"
|
||||||
Width="{DynamicResource CarouselIndicatorColumnarWidth}"
|
Width="{DynamicResource CarouselIndicatorColumnarWidth}"
|
||||||
Height="{DynamicResource CarouselIndicatorColumnarHeight}"
|
Height="{DynamicResource CarouselIndicatorColumnarHeight}"
|
||||||
Fill="{TemplateBinding Background}"
|
VerticalAlignment="Bottom"
|
||||||
Canvas.Top="{DynamicResource CarouselIndicatorColumnarCanvasHeight}"/>
|
Fill="{TemplateBinding Background}">
|
||||||
</Canvas>
|
<Rectangle.Transitions>
|
||||||
|
<Transitions>
|
||||||
|
<DoubleTransition Property="Height" Duration="0:0:0.2"></DoubleTransition>
|
||||||
|
</Transitions>
|
||||||
|
</Rectangle.Transitions>
|
||||||
|
</Rectangle>
|
||||||
|
</Border>
|
||||||
</Border>
|
</Border>
|
||||||
</Panel>
|
</Panel>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
@ -112,7 +118,6 @@
|
|||||||
<Style Selector="^:selected /template/ Rectangle#Container">
|
<Style Selector="^:selected /template/ Rectangle#Container">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CarouselIndicatorSelectedForeground}" />
|
<Setter Property="Fill" Value="{DynamicResource CarouselIndicatorSelectedForeground}" />
|
||||||
<Setter Property="Height" Value="{DynamicResource CarouselIndicatorColumnarSelectedHeight}" />
|
<Setter Property="Height" Value="{DynamicResource CarouselIndicatorColumnarSelectedHeight}" />
|
||||||
<Setter Property="Canvas.Top" Value="{DynamicResource CarouselIndicatorColumnarSelectedCanvasHeight}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
<x:Double x:Key="CarouselIndicatorColumnarWidth">4</x:Double>
|
<x:Double x:Key="CarouselIndicatorColumnarWidth">4</x:Double>
|
||||||
<x:Double x:Key="CarouselIndicatorColumnarHeight">12</x:Double>
|
<x:Double x:Key="CarouselIndicatorColumnarHeight">12</x:Double>
|
||||||
<x:Double x:Key="CarouselIndicatorColumnarSelectedHeight">20</x:Double>
|
<x:Double x:Key="CarouselIndicatorColumnarSelectedHeight">20</x:Double>
|
||||||
<x:Double x:Key="CarouselIndicatorColumnarCanvasHeight">8</x:Double>
|
|
||||||
<x:Double x:Key="CarouselIndicatorColumnarSelectedCanvasHeight">0</x:Double>
|
|
||||||
|
|
||||||
<Thickness x:Key="CarouselButtonMargin">8</Thickness>
|
<Thickness x:Key="CarouselButtonMargin">8</Thickness>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
Loading…
x
Reference in New Issue
Block a user