PageRenderTime 38ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

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