DetailViewerDot.xaml 1.7 KB

123456789101112131415161718192021222324252627282930
  1. <UserControl x:Class="HistoryDLL.DetailViewerDot"
  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:HistoryDLL"
  7. Width="20" Height="30">
  8. <UserControl.Resources>
  9. <Style TargetType="{x:Type Label}" x:Key="uxImgCircleStyle">
  10. <Setter Property="Template">
  11. <Setter.Value>
  12. <ControlTemplate>
  13. <Grid x:Name="uxMainGd" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="Transparent">
  14. <Control x:Name="Proxy" Background="{TemplateBinding Background}" />
  15. <Rectangle x:Name="uxCircle" IsEnabled="False" Width="10" Height="10" StrokeThickness="1" Fill="Transparent" Stroke="{TemplateBinding Background}"></Rectangle>
  16. </Grid>
  17. <ControlTemplate.Triggers>
  18. <Trigger Property="IsEnabled" Value="True">
  19. <Setter TargetName="uxCircle" Property="Fill" Value="{Binding Path=Background, ElementName=Proxy}"/>
  20. </Trigger>
  21. </ControlTemplate.Triggers>
  22. </ControlTemplate>
  23. </Setter.Value>
  24. </Setter>
  25. </Style>
  26. </UserControl.Resources>
  27. <Label x:Name="uxLabel" Style="{StaticResource uxImgCircleStyle}" IsEnabled="True" Background="White">
  28. </Label>
  29. </UserControl>