feat: add default solid theme.
This commit is contained in:
@@ -69,6 +69,7 @@
|
|||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="4"
|
Grid.Column="4"
|
||||||
u:ScrollTo.Direction="Top"
|
u:ScrollTo.Direction="Top"
|
||||||
|
u:ScrollTo.ButtonTheme="{DynamicResource PrimaryScrollToButton}"
|
||||||
ItemsSource="{Binding Items}"
|
ItemsSource="{Binding Items}"
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto" />
|
ScrollViewer.VerticalScrollBarVisibility="Auto" />
|
||||||
|
|||||||
@@ -45,4 +45,48 @@
|
|||||||
<Setter Property="RenderTransform" Value="rotate(270deg)"></Setter>
|
<Setter Property="RenderTransform" Value="rotate(270deg)"></Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
|
||||||
|
<ControlTheme x:Key="PrimaryScrollToButton" TargetType="u:ScrollToButton">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Bottom" />
|
||||||
|
<Setter Property="Cursor" Value="Hand"></Setter>
|
||||||
|
<Setter Property="Margin" Value="0, 0, 16, 16" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate TargetType="u:ScrollToButton">
|
||||||
|
<Border
|
||||||
|
Name="PART_Background"
|
||||||
|
Background="{DynamicResource ButtonSolidPrimaryBackground}"
|
||||||
|
CornerRadius="{DynamicResource ButtonCornerRadius}">
|
||||||
|
<PathIcon
|
||||||
|
Name="PART_Icon"
|
||||||
|
Margin="8"
|
||||||
|
Width="12"
|
||||||
|
Height="12"
|
||||||
|
Data="{DynamicResource ScrollToButtonIconGlyph}"
|
||||||
|
Foreground="{DynamicResource ButtonSolidForeground}" />
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
<Style Selector="^:pressed">
|
||||||
|
<Setter Property="RenderTransform" Value="scale(0.98)" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ Border#PART_Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^[Direction=Right] /template/ PathIcon#PART_Icon">
|
||||||
|
<Setter Property="RenderTransform" Value="rotate(90deg)"></Setter>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^[Direction=Bottom] /template/ PathIcon#PART_Icon">
|
||||||
|
<Setter Property="RenderTransform" Value="rotate(180deg)"></Setter>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^[Direction=Left] /template/ PathIcon#PART_Icon">
|
||||||
|
<Setter Property="RenderTransform" Value="rotate(270deg)"></Setter>
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
Reference in New Issue
Block a user