ReplyStatusControl.xaml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <UserControl x:Class="ComPDFKit.Controls.PDFControlUI.ReplyStatusControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:ComPDFKit.Controls.PDFControlUI"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800">
  9. <UserControl.Resources>
  10. <Style x:Key="MenuItemStyle" TargetType="local:PathMenuItem">
  11. <Setter Property="Template">
  12. <Setter.Value>
  13. <ControlTemplate TargetType="{x:Type local:PathMenuItem}">
  14. <Border x:Name="border"
  15. Background="#FFFFFF"
  16. BorderThickness="0"
  17. Height="40">
  18. <Grid Margin="20,0,20,0">
  19. <Grid.ColumnDefinitions>
  20. <ColumnDefinition Width="Auto"></ColumnDefinition>
  21. <ColumnDefinition Width="Auto"></ColumnDefinition>
  22. </Grid.ColumnDefinitions>
  23. <ContentPresenter x:Name="IconPresenter"
  24. ContentSource="IconPath"
  25. Grid.Column="0">
  26. </ContentPresenter>
  27. <ContentPresenter x:Name="contentPresenter"
  28. Grid.Column="1"
  29. ContentSource="Header"
  30. TextBlock.Foreground="#000000"
  31. TextBlock.FontFamily="SegoeUI"
  32. TextBlock.FontSize="15"
  33. Margin="10,0,0,0"
  34. HorizontalAlignment="Left"
  35. VerticalAlignment="Center">
  36. </ContentPresenter>
  37. </Grid>
  38. </Border>
  39. <ControlTemplate.Triggers>
  40. <Trigger Property="IsEnabled" Value="False">
  41. <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#6A6A6A"></Setter>
  42. <Setter TargetName="border" Property="Background" Value="#EFEFEF"></Setter>
  43. </Trigger>
  44. <Trigger Property="IsHighlighted" Value="True">
  45. <Setter Property="Background" TargetName="border" Value="#2894FF"></Setter>
  46. <Setter Property="BorderBrush" TargetName="border" Value="#2894FF"></Setter>
  47. <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#FFFFFF"></Setter>
  48. </Trigger>
  49. </ControlTemplate.Triggers>
  50. </ControlTemplate>
  51. </Setter.Value>
  52. </Setter>
  53. </Style>
  54. </UserControl.Resources>
  55. <Grid Height="auto">
  56. <Grid Height="30" Width="30">
  57. <Menu Background="Transparent">
  58. <local:PathMenuItem x:Name="IconMenu" Height="30" Width="30" Margin="0" Padding="0">
  59. <local:PathMenuItem.Header>
  60. <Grid x:Name="ButtonIcon" Height="30" Width="30">
  61. <Canvas Height="20" Width="20">
  62. <Rectangle Stroke="#5A000000" StrokeThickness="2" Width="16" Height="16"/>
  63. <Line X1="1" Y1="1" X2="15" Y2="15" Stroke="#5A000000" StrokeThickness="2"/>
  64. </Canvas>
  65. </Grid>
  66. </local:PathMenuItem.Header>
  67. </local:PathMenuItem>
  68. </Menu>
  69. </Grid>
  70. </Grid>
  71. </UserControl>