You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
3.5 KiB
59 lines
3.5 KiB
<UserControl x:Class="W10SS_GUI.Controls.HamburgerCategoryButton"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:W10SS_GUI.Controls"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="{DynamicResource ResourceKey=buttonHamburgerHeight}" d:DesignWidth="{DynamicResource ResourceKey=panelHamburgerMaxWidth}">
|
|
<Grid>
|
|
<StackPanel Name="hamburgerCategory"
|
|
Width="{DynamicResource ResourceKey=panelHamburgerMaxWidth}"
|
|
Height="{DynamicResource ResourceKey=buttonHamburgerHeight}"
|
|
Orientation="Horizontal">
|
|
<StackPanel.Background>
|
|
<SolidColorBrush Color="#3F51B5" x:Name="PanelColor"/>
|
|
</StackPanel.Background>
|
|
<StackPanel.Triggers>
|
|
<EventTrigger RoutedEvent="MouseEnter">
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<ColorAnimation Storyboard.TargetName="PanelColor" Storyboard.TargetProperty="Color"
|
|
Duration="0:0:0.2" From="#3F51B5"
|
|
To="#2196F3" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
<EventTrigger RoutedEvent="MouseLeave">
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<ColorAnimation Storyboard.TargetName="PanelColor" Storyboard.TargetProperty="Color"
|
|
Duration="0:0:0.2" From="#2196F3" To="#3F51B5" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
<EventTrigger RoutedEvent="MouseLeftButtonDown">
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<ThicknessAnimation Storyboard.TargetName="panelContainer" Storyboard.TargetProperty="Margin"
|
|
Duration="0:0:0.5" From="0 0 0 0" To="0 5 0 0" SpeedRatio="5"
|
|
AutoReverse="True"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
</StackPanel.Triggers>
|
|
|
|
<StackPanel Name="panelContainer"
|
|
|
|
Orientation="Horizontal">
|
|
<TextBlock Name="textIcon" FontFamily="Segoe MDL2 Assets" FontSize="{DynamicResource buttonHamburgerFontSize}"
|
|
Margin="10" Foreground="{DynamicResource ResourceKey=ColorWhite}"
|
|
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=IconText}"/>
|
|
<TextBlock Name="textCategory" FontSize="{DynamicResource ResourceKey=buttonHamburgerCategoryFontSize}"
|
|
Foreground="{DynamicResource ResourceKey=ColorWhite}"
|
|
Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=Text}"
|
|
VerticalAlignment="Center" Margin="5 0 5 3"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|
|
|