I have created a ControlTemplate for checkbox using multiple path geometry. The code for the ControlTemplate is as below.
I want to position the inner hexagon in center of the outer hexagon, I am not getting how to do that. I tried using Margin but its not working to make it perfect center.
"checkboxTemplateHex" TargetType="CheckBox"> -
-
"Equis2" Opacity="1" StrokeThickness="1" Stroke="YellowGreen" Fill="Transparent" Data="M7.99999993117449,0.5L15.4999998937224,4.25L15.4999998937224,11.75L7.99999993117449,15.5L0.499999968626539,11.75L0.499999968626537,4.25z"/> -
"Equis" Opacity="1" StrokeThickness="0" Stroke="YellowGreen" Fill="YellowGreen" Data="M5.5,0L10.999999995477,2.75L10.999999995477,8.25L5.5,11L4.52300163988895E-09,8.25L4.52300019659901E-09,2.75z"/> -
"0" HorizontalAlignment="Left" VerticalAlignment="Top"/> -
"5" Grid.Column="1" Template="{StaticResource checkboxTemplateHex}" FocusVisualStyle="{x:Null}" IsChecked="True"/>
Rajkiran SwainPosted Jan 4, 2018, 7:56 AM