RadioCheckBox.xaml 1.4 KB

1234567891011121314151617181920212223242526272829
  1. <CheckBox x:Class="MECF.Framework.UI.Client.CenterViews.Configs.SignalTowerConfig.RadioCheckBox"
  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:MECF.Framework.UI.Client.CenterViews.Configs.SignalTowerConfig"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800">
  9. <CheckBox.Style>
  10. <Style TargetType="{x:Type local:RadioCheckBox}">
  11. <Setter Property="Template">
  12. <Setter.Value>
  13. <ControlTemplate TargetType="{x:Type local:RadioCheckBox}">
  14. <Grid>
  15. <RadioButton
  16. IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent},
  17. Path=IsChecked, Mode=TwoWay}"
  18. IsHitTestVisible="False" />
  19. <CheckBox
  20. IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent},
  21. Path=IsChecked, Mode=TwoWay}" Opacity="0"/>
  22. </Grid>
  23. </ControlTemplate>
  24. </Setter.Value>
  25. </Setter>
  26. </Style>
  27. </CheckBox.Style>
  28. </CheckBox>