123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <ResourceDictionary
- 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:cnvt="clr-namespace:Waaagh.Converters"
- xmlns:cc="clr-namespace:Waaagh.CustomControl"
- xmlns:james="https://jamesnet.dev/xaml/presentation"
- xmlns:helper="clr-namespace:Waaagh.Helpers">
- <Storyboard x:Key="Selected">
- <james:ThickItem Mode="CubicEaseInOut" TargetName="icon" Duration="0:0:0.5" Property="Margin" To="0 -80 0 0"/>
- <james:ThickItem Mode="CubicEaseInOut" TargetName="name" Duration="0:0:0.5" Property="Margin" To="0 45 0 0"/>
- <james:ColorItem Mode="CubicEaseInOut" TargetName="icon" Duration="0:0:0.5" Property="Fill.Color" To="#333333"/>
- <james:ColorItem Mode="CubicEaseInOut" TargetName="name" Duration="0:0:0.5" Property="Foreground.Color" To="#333333"/>
- </Storyboard>
- <Storyboard x:Key="UnSelected">
- <james:ThickItem Mode="CubicEaseInOut" TargetName="icon" Duration="0:0:0.5" Property="Margin" To="0 0 0 0"/>
- <james:ThickItem Mode="CubicEaseInOut" TargetName="name" Duration="0:0:0.5" Property="Margin" To="0 60 0 0"/>
- <james:ColorItem Mode="CubicEaseInOut" TargetName="icon" Duration="0:0:0.5" Property="Fill.Color" To="#44333333"/>
- <james:ColorItem Mode="CubicEaseInOut" TargetName="name" Duration="0:0:0.5" Property="Foreground.Color" To="#00000000"/>
- </Storyboard>
- <Style TargetType="{x:Type james:JamesIcon}" x:Key="Icon">
- <Setter Property="Icon" Value="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=Tag}"/>
- <Setter Property="Width" Value="40"/>
- <Setter Property="Height" Value="40"/>
- <Setter Property="Fill" Value="#44333333"/>
- </Style>
- <Style TargetType="{x:Type TextBlock}" x:Key="Name">
- <Setter Property="Text" Value="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=Content}"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="FontWeight" Value="Bold"/>
- <Setter Property="FontSize" Value="14"/>
- <Setter Property="Foreground" Value="#00000000"/>
- <Setter Property="Margin" Value="0 60 0 0"/>
- </Style>
- <Style TargetType="{x:Type ListBoxItem}" x:Key="MagicBarItem">
- <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Grid Background="{TemplateBinding Background}">
- <james:JamesIcon x:Name="icon" Style="{StaticResource Icon}"/>
- <TextBlock x:Name="name" Style="{StaticResource Name}"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Trigger.EnterActions>
- <BeginStoryboard Storyboard="{StaticResource Selected}"/>
- </Trigger.EnterActions>
- <Trigger.ExitActions>
- <BeginStoryboard Storyboard="{StaticResource UnSelected}"/>
- </Trigger.ExitActions>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Geometry x:Key="ArcData">
- M0,0 L100,0 C95.167503,0 91.135628,3.4278221 90.203163,7.9846497 L90.152122,8.2704506 89.963921,9.1416779 C85.813438,27.384438 69.496498,41 50,41 30.5035,41 14.186564,27.384438 10.036079,9.1416779 L9.8478823,8.2704926 9.7968359,7.9846497 C8.8643732,3.4278221 4.8324914,0 0,0 z
- </Geometry>
- <Style TargetType="{x:Type Path}" x:Key="Arc">
- <Setter Property="Data" Value="{StaticResource ArcData}"/>
- <Setter Property="Width" Value="100"/>
- <Setter Property="Height" Value="100"/>
- <Setter Property="Fill" Value="#222222"/>
- <Setter Property="Margin" Value="-10 40 -10 -1"/>
- </Style>
- <Style TargetType="{x:Type Border}" x:Key="Bar">
- <Setter Property="Background" Value="#DDDDDD"/>
- <Setter Property="Margin" Value="0 40 0 0"/>
- <Setter Property="CornerRadius" Value="10"/>
- </Style>
- <Style TargetType="{x:Type Grid}" x:Key="Circle">
- <Setter Property="Width" Value="80"/>
- <Setter Property="Height" Value="80"/>
- <Setter Property="Canvas.Left" Value="-100"/>
- </Style>
- <Style TargetType="{x:Type cc:NavigationBar}">
- <Setter Property="ItemContainerStyle" Value="{StaticResource MagicBarItem}"/>
- <Setter Property="SnapsToDevicePixels" Value="True"/>
- <Setter Property="UseLayoutRounding" Value="True"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Width" Value="440"/>
- <Setter Property="Height" Value="120"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type cc:NavigationBar}">
- <Grid Background="{TemplateBinding Background}">
- <Grid.Clip>
- <RectangleGeometry Rect="0 0 440 120"/>
- </Grid.Clip>
- <Border Style="{StaticResource Bar}"/>
- <Canvas Margin="20 0 20 0">
- <Grid x:Name="PART_Circle" Style="{StaticResource Circle}">
- <Path Style="{StaticResource Arc}"/>
- <Ellipse Fill="#222222"/>
- <Ellipse Fill="CadetBlue" Margin="6"/>
- </Grid>
- </Canvas>
- <ItemsPresenter Margin="20 40 20 0"/>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="ItemsPanel">
- <Setter.Value>
- <ItemsPanelTemplate>
- <UniformGrid Columns="5"/>
- </ItemsPanelTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|