/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
1<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 2 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 3 xmlns:root="clr-namespace:Elysium.Theme" 4 xmlns:controls="clr-namespace:Elysium.Theme.Controls"> 5 6 <ResourceDictionary.MergedDictionaries> 7 <ResourceDictionary Source="/Elysium.Theme;component/Themes/SharedResources.xaml"/> 8 <ResourceDictionary Source="/Elysium.Theme;component/Themes/Scrolls/ScrollBar.xaml"/> 9 </ResourceDictionary.MergedDictionaries> 10 11 <Style x:Key="{x:Type controls:Submenu}" TargetType="{x:Type controls:Submenu}"> 12 13 <Setter Property="Background" Value="{StaticResource Background}"/> 14 <Setter Property="BorderBrush" Value="{StaticResource Lowlight}"/> 15 <Setter Property="BorderThickness" Value="{Binding Source={x:Static root:Parameters.Instance}, Path=DefaultThickness, Mode=OneWay}"/> 16 <Setter Property="Foreground" Value="{StaticResource Foreground}"/> 17 <Setter Property="FontFamily" Value="{Binding Source={x:Static root:Parameters.Instance}, Path=FontFamily, Mode=OneWay}"/> 18 <Setter Property="FontSize" Value="{Binding Source={x:Static root:Parameters.Instance}, Path=ContentFontSize, Mode=OneWay}"/> 19 <Setter Property="FontWeight" Value="Normal"/> 20 21 <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/> 22 <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> 23 <Setter Property="ScrollViewer.CanContentScroll" Value="True"/> 24 <Setter Property="ScrollViewer.PanningMode" Value="Both"/> 25 26 <Setter Property="Stylus.IsFlicksEnabled" Value="False"/> 27 28 <Setter Property="HorizontalContentAlignment" Value="Stretch"/> 29 <Setter Property="VerticalContentAlignment" Value="Stretch"/> 30 <Setter Property="Padding" Value="{Binding Source={x:Static root:Parameters.Instance}, Path=BoldPadding, Mode=OneWay}"/> 31 32 <Setter Property="Grid.IsSharedSizeScope" Value="True"/> 33 34 <Setter Property="SnapsToDevicePixels" Value="True"/> 35 36 <Setter Property="Template"> 37 <Setter.Value> 38 <ControlTemplate TargetType="{x:Type controls:Submenu}"> 39 <ScrollViewer Background="{TemplateBinding Background}" 40 BorderBrush="{TemplateBinding BorderBrush}" 41 BorderThickness="{TemplateBinding BorderThickness}" 42 TextBlock.Foreground="{TemplateBinding Foreground}" 43 TextBlock.FontFamily="{TemplateBinding FontFamily}" 44 TextBlock.FontSize="{TemplateBinding FontSize}" 45 TextBlock.FontWeight="{TemplateBinding FontWeight}" 46 SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"> 47 <ScrollViewer.Resources> 48 <Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource {x:Type ScrollBar}}"> 49 <Style.Triggers> 50 <Trigger Property="Orientation" Value="Vertical"> 51 <Setter Property="BorderThickness" Value="0"/> 52 </Trigger> 53 </Style.Triggers> 54 </Style> 55 </ScrollViewer.Resources> 56 <StackPanel IsItemsHost="True" 57 KeyboardNavigation.DirectionalNavigation="Cycle"/> 58 </ScrollViewer> 59 </ControlTemplate> 60 </Setter.Value> 61 </Setter> 62 63 </Style> 64 65</ResourceDictionary>