92
src/Ursa.Themes.Semi/Controls/ScrollToButton.axaml
Normal file
92
src/Ursa.Themes.Semi/Controls/ScrollToButton.axaml
Normal file
@@ -0,0 +1,92 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:u="https://irihi.tech/ursa">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="{x:Type u:ScrollToButton}" 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 ButtonDefaultBackground}"
|
||||
CornerRadius="{DynamicResource ButtonCornerRadius}">
|
||||
<PathIcon
|
||||
Name="PART_Icon"
|
||||
Margin="8"
|
||||
Width="12"
|
||||
Height="12"
|
||||
Data="{DynamicResource ScrollToButtonIconGlyph}"
|
||||
Foreground="{DynamicResource ButtonDefaultPrimaryForeground}" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="RenderTransform" Value="scale(0.98)" />
|
||||
</Style>
|
||||
<Style Selector="^:pointerover /template/ Border#PART_Background">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Border#PART_Background">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPressedBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
||||
</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>
|
||||
|
||||
|
||||
<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>
|
||||
@@ -25,6 +25,7 @@
|
||||
<ResourceInclude Source="NumberDisplayer.axaml" />
|
||||
<ResourceInclude Source="Pagination.axaml" />
|
||||
<ResourceInclude Source="RangeSlider.axaml" />
|
||||
<ResourceInclude Source="ScrollToButton.axaml" />
|
||||
<ResourceInclude Source="SelectionList.axaml" />
|
||||
<ResourceInclude Source="TagInput.axaml" />
|
||||
<ResourceInclude Source="ThemeSelector.axaml" />
|
||||
|
||||
5
src/Ursa.Themes.Semi/Themes/Shared/ScrollToButton.axaml
Normal file
5
src/Ursa.Themes.Semi/Themes/Shared/ScrollToButton.axaml
Normal file
@@ -0,0 +1,5 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<StreamGeometry x:Key="ScrollToButtonIconGlyph">M19.637 16.4369C19.0513 17.0227 18.1015 17.0227 17.5157 16.4369L11.8589 10.7801L6.20202 16.4369C5.61623 17.0227 4.66648 17.0227 4.0807 16.4369C3.49491 15.8511 3.49491 14.9014 4.0807 14.3156L10.7982 7.59809C11.384 7.01231 12.3337 7.01231 12.9195 7.59809L19.637 14.3156C20.2228 14.9014 20.2228 15.8511 19.637 16.4369Z</StreamGeometry>
|
||||
</ResourceDictionary>
|
||||
@@ -13,6 +13,7 @@
|
||||
<MergeResourceInclude Source="MessageBox.axaml" />
|
||||
<MergeResourceInclude Source="NavigationMenu.axaml" />
|
||||
<MergeResourceInclude Source="Pagination.axaml" />
|
||||
<MergeResourceInclude Source="ScrollToButton.axaml" />
|
||||
<MergeResourceInclude Source="TagInput.axaml" />
|
||||
<MergeResourceInclude Source="Skeleton.axaml" />
|
||||
<MergeResourceInclude Source="ThemeSelector.axaml" />
|
||||
|
||||
Reference in New Issue
Block a user