25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

50 satır
3.1 KiB

  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:bpa="clr-namespace:BPA.UIControl">
  4. <ResourceDictionary.MergedDictionaries>
  5. <ResourceDictionary Source="pack://application:,,,/BPA.UIControl;component/Themes/Menu.xaml" />
  6. </ResourceDictionary.MergedDictionaries>
  7. <Style x:Key="RubyerContextMenu" TargetType="{x:Type ContextMenu}">
  8. <Setter Property="Background" Value="{DynamicResource FloatBackground}" />
  9. <Setter Property="BorderBrush" Value="{DynamicResource Border}" />
  10. <Setter Property="BorderThickness" Value="0" />
  11. <Setter Property="Margin" Value="5" />
  12. <Setter Property="Padding" Value="0 5" />
  13. <Setter Property="Grid.IsSharedSizeScope" Value="True" />
  14. <Setter Property="OverridesDefaultStyle" Value="True" />
  15. <Setter Property="SnapsToDevicePixels" Value="True" />
  16. <Setter Property="bpa:ControlHelper.CornerRadius" Value="{DynamicResource AllControlCornerRadius}" />
  17. <Setter Property="bpa:ControlHelper.MaskOpacity" Value="0.6" />
  18. <Setter Property="bpa:ControlHelper.FocusedBrush" Value="{DynamicResource Mask}" />
  19. <Setter Property="bpa:ItemsControlHelper.ItemMargin" Value="5 1" />
  20. <Setter Property="bpa:ItemsControlHelper.ItemPadding" Value="10 5" />
  21. <Setter Property="bpa:MenuHelper.IconWidth" Value="24" />
  22. <Setter Property="Template">
  23. <Setter.Value>
  24. <ControlTemplate TargetType="{x:Type ContextMenu}">
  25. <Grid>
  26. <Border Margin="{TemplateBinding Margin}"
  27. Padding="{TemplateBinding Padding}"
  28. Background="{DynamicResource FloatBackground}"
  29. CornerRadius="{Binding Path=(bpa:ControlHelper.CornerRadius), RelativeSource={RelativeSource Mode=TemplatedParent}}"
  30. Effect="{DynamicResource AllDirectionEffect2}" />
  31. <Border x:Name="Border"
  32. Margin="{TemplateBinding Margin}"
  33. Padding="{TemplateBinding Padding}"
  34. Background="{DynamicResource FloatBackground}"
  35. BorderBrush="{TemplateBinding BorderBrush}"
  36. BorderThickness="{TemplateBinding BorderThickness}"
  37. CornerRadius="{Binding Path=(bpa:ControlHelper.CornerRadius), RelativeSource={RelativeSource Mode=TemplatedParent}}">
  38. <StackPanel IsItemsHost="True"
  39. KeyboardNavigation.DirectionalNavigation="Cycle"
  40. KeyboardNavigation.TabNavigation="Cycle"
  41. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  42. </Border>
  43. </Grid>
  44. </ControlTemplate>
  45. </Setter.Value>
  46. </Setter>
  47. </Style>
  48. </ResourceDictionary>