/Source code/Theme/Themes/Menus/Submenu.xaml
XAML | 65 lines | 54 code | 11 blank | 0 comment | 0 complexity | 1c736cd898fc26068d456dd7ec8cc764 MD5 | raw file
Possible License(s): Apache-2.0
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:root="clr-namespace:Elysium.Theme"
- xmlns:controls="clr-namespace:Elysium.Theme.Controls">
-
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/Elysium.Theme;component/Themes/SharedResources.xaml"/>
- <ResourceDictionary Source="/Elysium.Theme;component/Themes/Scrolls/ScrollBar.xaml"/>
- </ResourceDictionary.MergedDictionaries>
-
- <Style x:Key="{x:Type controls:Submenu}" TargetType="{x:Type controls:Submenu}">
-
- <Setter Property="Background" Value="{StaticResource Background}"/>
- <Setter Property="BorderBrush" Value="{StaticResource Lowlight}"/>
- <Setter Property="BorderThickness" Value="{Binding Source={x:Static root:Parameters.Instance}, Path=DefaultThickness, Mode=OneWay}"/>
- <Setter Property="Foreground" Value="{StaticResource Foreground}"/>
- <Setter Property="FontFamily" Value="{Binding Source={x:Static root:Parameters.Instance}, Path=FontFamily, Mode=OneWay}"/>
- <Setter Property="FontSize" Value="{Binding Source={x:Static root:Parameters.Instance}, Path=ContentFontSize, Mode=OneWay}"/>
- <Setter Property="FontWeight" Value="Normal"/>
-
- <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
- <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
- <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
-
- <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
-
- <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
- <Setter Property="VerticalContentAlignment" Value="Stretch"/>
- <Setter Property="Padding" Value="{Binding Source={x:Static root:Parameters.Instance}, Path=BoldPadding, Mode=OneWay}"/>
-
- <Setter Property="Grid.IsSharedSizeScope" Value="True"/>
-
- <Setter Property="SnapsToDevicePixels" Value="True"/>
-
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type controls:Submenu}">
- <ScrollViewer Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- TextBlock.Foreground="{TemplateBinding Foreground}"
- TextBlock.FontFamily="{TemplateBinding FontFamily}"
- TextBlock.FontSize="{TemplateBinding FontSize}"
- TextBlock.FontWeight="{TemplateBinding FontWeight}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
- <ScrollViewer.Resources>
- <Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource {x:Type ScrollBar}}">
- <Style.Triggers>
- <Trigger Property="Orientation" Value="Vertical">
- <Setter Property="BorderThickness" Value="0"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </ScrollViewer.Resources>
- <StackPanel IsItemsHost="True"
- KeyboardNavigation.DirectionalNavigation="Cycle"/>
- </ScrollViewer>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
-
- </Style>
-
- </ResourceDictionary>