MenuButtonStyle.xaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:local="clr-namespace:PixiEditor.Styles">
  4. <Style TargetType="Button" x:Key="MenuButton">
  5. <Setter Property="Height" Value="30"/>
  6. <Setter Property="Width" Value="60"/>
  7. <Setter Property="Background" Value="Transparent"/>
  8. <Setter Property="Foreground" Value="Snow"/>
  9. <Setter Property="BorderThickness" Value="0"/>
  10. </Style>
  11. <Style TargetType="Button" x:Key="MenuInsideButtonStyle">
  12. <Setter Property="Height" Value="20"/>
  13. <Setter Property="Width" Value="185"/>
  14. <Setter Property="Background" Value="Transparent"/>
  15. <Setter Property="Foreground" Value="Snow"/>
  16. <Setter Property="BorderThickness" Value="0"/>
  17. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  18. <Setter Property="OverridesDefaultStyle" Value="True"/>
  19. <Setter Property="DataContext" Value="{DynamicResource ViewModelMain}"/>
  20. <Setter Property="Template">
  21. <Setter.Value>
  22. <ControlTemplate TargetType="Button">
  23. <Grid Background="{TemplateBinding Background}">
  24. <ContentPresenter x:Name="MyContentPresenter"
  25. Content="{TemplateBinding Content}"/>
  26. </Grid>
  27. </ControlTemplate>
  28. </Setter.Value>
  29. </Setter>
  30. <Style.Triggers>
  31. <Trigger Property="IsEnabled" Value="False">
  32. <Setter Property="Background" Value="Transparent"/>
  33. <Setter Property="Foreground" Value="DarkGray"/>
  34. </Trigger>
  35. <Trigger Property="IsMouseOver" Value="True">
  36. <Setter Property="Background" Value="#666666"/>
  37. </Trigger>
  38. </Style.Triggers>
  39. </Style>
  40. <Style TargetType="ListView" x:Key="MenuListViewStyle">
  41. <Setter Property="Background" Value="#343636"/>
  42. <Setter Property="Height" Value="300"/>
  43. <Setter Property="Width" Value="200"/>
  44. <Style.Resources>
  45. <Style TargetType="ContentControl">
  46. <Setter Property="Foreground" Value="Snow"/>
  47. <Setter Property="Margin" Value="0,0,0,2"/>
  48. <Setter Property="Background" Value="Transparent"/>
  49. <Setter Property="BorderThickness" Value="0"/>
  50. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  51. <Setter Property="Height" Value="290"/>
  52. <Setter Property="Width" Value="185"/>
  53. </Style>
  54. </Style.Resources>
  55. </Style>
  56. </ResourceDictionary>