You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
4.0 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/Resources/Default.xaml" />
  6. </ResourceDictionary.MergedDictionaries>
  7. <Style x:Key="RubyerTag" TargetType="{x:Type bpa:Tag}">
  8. <Setter Property="Background" Value="{DynamicResource Primary}" />
  9. <Setter Property="BorderBrush" Value="Transparent" />
  10. <Setter Property="BorderThickness" Value="0" />
  11. <Setter Property="Cursor" Value="Hand" />
  12. <Setter Property="Foreground" Value="{DynamicResource WhiteForeground}" />
  13. <Setter Property="HeadBackground" Value="{DynamicResource DefaultForeground}" />
  14. <Setter Property="HeadForeground" Value="{DynamicResource DefaultBackground}" />
  15. <Setter Property="SnapsToDevicePixels" Value="True" />
  16. <Setter Property="Padding" Value="5 3" />
  17. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
  18. <Setter Property="Template">
  19. <Setter.Value>
  20. <ControlTemplate TargetType="{x:Type bpa:Tag}">
  21. <Border x:Name="rootBorder"
  22. CornerRadius="3"
  23. ToolTip="{TemplateBinding Url}">
  24. <Grid>
  25. <Grid.ColumnDefinitions>
  26. <ColumnDefinition Width="Auto" />
  27. <ColumnDefinition Width="Auto" />
  28. </Grid.ColumnDefinitions>
  29. <Border x:Name="headBorder"
  30. Padding="{TemplateBinding Padding}"
  31. Background="{TemplateBinding HeadBackground}"
  32. CornerRadius="{DynamicResource LeftControlCornerRadius}"
  33. TextBlock.FontWeight="Bold"
  34. TextBlock.Foreground="{TemplateBinding HeadForeground}">
  35. <ContentPresenter ContentSource="Header"
  36. Focusable="False"
  37. RecognizesAccessKey="True"
  38. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  39. </Border>
  40. <Border x:Name="contentBorder"
  41. Grid.Column="1"
  42. Padding="{TemplateBinding Padding}"
  43. Background="{TemplateBinding Background}"
  44. CornerRadius="{DynamicResource RightControlCornerRadius}"
  45. TextBlock.FontWeight="Bold"
  46. TextBlock.Foreground="{TemplateBinding Foreground}">
  47. <ContentPresenter Focusable="False"
  48. RecognizesAccessKey="True"
  49. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  50. </Border>
  51. </Grid>
  52. </Border>
  53. <ControlTemplate.Triggers>
  54. <Trigger Property="Url" Value="{x:Null}">
  55. <Setter Property="Cursor" Value="Arrow" />
  56. </Trigger>
  57. <Trigger Property="Header" Value="{x:Null}">
  58. <Setter TargetName="contentBorder" Property="CornerRadius" Value="3" />
  59. <Setter TargetName="headBorder" Property="Padding" Value="0" />
  60. </Trigger>
  61. </ControlTemplate.Triggers>
  62. </ControlTemplate>
  63. </Setter.Value>
  64. </Setter>
  65. </Style>
  66. </ResourceDictionary>