|
1 | | -<?xml version="1.0" encoding="utf-8"?> |
| 1 | +<?xml version="1.0" encoding="utf-8" ?> |
2 | 2 | <UserControl |
3 | 3 | x:Class="UniGetUI.Interface.Widgets.NavButton" |
4 | 4 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
5 | 5 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
6 | | - xmlns:local="using:UniGetUI.Interface.Widgets" |
| 6 | + xmlns:animations="using:CommunityToolkit.WinUI.Animations" |
7 | 7 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 8 | + xmlns:local="using:UniGetUI.Interface.Widgets" |
8 | 9 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
9 | | - mc:Ignorable="d" |
10 | | - Height="Auto" Width="70" |
11 | | - xmlns:widgets="using:UniGetUI.Interface.Widgets" xmlns:animations="using:CommunityToolkit.WinUI.Animations"> |
| 10 | + xmlns:widgets="using:UniGetUI.Interface.Widgets" |
| 11 | + Width="70" |
| 12 | + Height="Auto" |
| 13 | + mc:Ignorable="d"> |
12 | 14 |
|
13 | 15 |
|
14 | 16 | <animations:Implicit.ShowAnimations> |
15 | | - <animations:TranslationAnimation Duration="0:0:0.25" From="-100,0,0" To="0"/> |
16 | | - <animations:OpacityAnimation Duration="0:0:0.25" From="0" To="1"/> |
| 17 | + <animations:TranslationAnimation |
| 18 | + From="-100,0,0" |
| 19 | + To="0" |
| 20 | + Duration="0:0:0.25" /> |
| 21 | + <animations:OpacityAnimation |
| 22 | + From="0" |
| 23 | + To="1" |
| 24 | + Duration="0:0:0.25" /> |
17 | 25 | </animations:Implicit.ShowAnimations> |
18 | 26 |
|
19 | 27 | <Grid> |
|
22 | 30 | <animations:OpacityAnimation Duration="0:0:0.25" From="0" To="1"/> |
23 | 31 | </animations:Implicit.ShowAnimations> |
24 | 32 | </Border--> |
25 | | - <Grid Margin="1,0,1,0" Padding="0" Name="VariableGrid"> |
| 33 | + <Grid |
| 34 | + Name="VariableGrid" |
| 35 | + Margin="1,0,1,0" |
| 36 | + Padding="0"> |
26 | 37 | <Grid.RowDefinitions> |
27 | | - <RowDefinition Height="30"/> |
28 | | - <RowDefinition Height="Auto"/> |
| 38 | + <RowDefinition Height="30" /> |
| 39 | + <RowDefinition Height="Auto" /> |
29 | 40 | </Grid.RowDefinitions> |
30 | | - <FontIcon |
31 | | - Grid.Row="0" x:Name="IconBlock" |
32 | | - FontSize="16" VerticalAlignment="Bottom"/> |
| 41 | + <FontIcon |
| 42 | + x:Name="IconBlock" |
| 43 | + Grid.Row="0" |
| 44 | + VerticalAlignment="Bottom" |
| 45 | + FontSize="16" /> |
33 | 46 | <TextBlock |
34 | 47 | x:Name="TextBlock" |
35 | | - FontSize="11" Grid.Row="1" |
36 | | - MinHeight="28" VerticalAlignment="Center" |
| 48 | + Grid.Row="1" |
| 49 | + MinHeight="28" |
| 50 | + Padding="0,4,0,4" |
37 | 51 | HorizontalAlignment="Center" |
| 52 | + VerticalAlignment="Center" |
| 53 | + FontSize="11" |
38 | 54 | TextAlignment="Center" |
39 | | - TextWrapping="Wrap" Padding="0,4,0,4" |
40 | | - /> |
| 55 | + TextWrapping="Wrap" /> |
41 | 56 | </Grid> |
42 | | - <ToggleButton x:Name="ToggleButton" |
43 | | - x:FieldModifier="public" Foreground="Transparent" |
44 | | - Click="ToggleButton_Click"> |
| 57 | + <ToggleButton |
| 58 | + x:Name="ToggleButton" |
| 59 | + x:FieldModifier="public" |
| 60 | + Click="ToggleButton_Click" |
| 61 | + Foreground="Transparent"> |
45 | 62 | <ToggleButton.Style> |
46 | 63 | <Style TargetType="ToggleButton"> |
47 | 64 | <Setter Property="Background" Value="{ThemeResource ControlAltFillColorTransparent}" /> |
|
61 | 78 | <Setter Property="Template"> |
62 | 79 | <Setter.Value> |
63 | 80 | <ControlTemplate TargetType="ToggleButton"> |
64 | | - <ContentPresenter x:Name="ContentPresenter" |
| 81 | + <ContentPresenter |
| 82 | + x:Name="ContentPresenter" |
| 83 | + Padding="{TemplateBinding Padding}" |
| 84 | + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 85 | + VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
| 86 | + AutomationProperties.AccessibilityView="Raw" |
65 | 87 | Background="{TemplateBinding Background}" |
66 | 88 | BackgroundSizing="{TemplateBinding BackgroundSizing}" |
67 | 89 | BorderBrush="{TemplateBinding BorderBrush}" |
68 | 90 | BorderThickness="{TemplateBinding BorderThickness}" |
69 | 91 | Content="{TemplateBinding Content}" |
70 | 92 | ContentTemplate="{TemplateBinding ContentTemplate}" |
71 | 93 | ContentTransitions="{TemplateBinding ContentTransitions}" |
72 | | - CornerRadius="{TemplateBinding CornerRadius}" |
73 | | - Padding="{TemplateBinding Padding}" |
74 | | - HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
75 | | - VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
76 | | - AutomationProperties.AccessibilityView="Raw"> |
| 94 | + CornerRadius="{TemplateBinding CornerRadius}"> |
77 | 95 | <ContentPresenter.BackgroundTransition> |
78 | 96 | <BrushTransition Duration="0:0:0.083" /> |
79 | 97 | </ContentPresenter.BackgroundTransition> |
80 | 98 |
|
81 | 99 | <VisualStateManager.VisualStateGroups> |
82 | 100 | <VisualStateGroup x:Name="CommonStates"> |
83 | | - <VisualState x:Name="Normal" > |
| 101 | + <VisualState x:Name="Normal"> |
84 | 102 | <Storyboard> |
85 | 103 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background"> |
86 | 104 | <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ControlAltFillColorTransparent}" /> |
|
0 commit comments