Created
October 5, 2021 18:03
-
-
Save DamianSuess/0bdf56a73149c4317dc92ace088a2f39 to your computer and use it in GitHub Desktop.
XAML Grid's first column styles for CheckBoxes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page.Resources> | |
<Style TargetType="{x:Type CheckBox}" | |
BasedOn="{StaticResource {x:Type CheckBox}}"> | |
<Style.Triggers> | |
<Trigger Property="Grid.Column" Value="0"> | |
<Setter Property="HorizontalAlignment" Value="Center" /> | |
<Setter Property="VerticalAlignment" Value="Center" /> | |
</Trigger> | |
</Style.Triggers> | |
</Style> | |
</Page.Resources> | |
<Grid Margin="0 30 0 0"> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="50" /> | |
<ColumnDefinition Width="300" /> | |
<ColumnDefinition Width="300" /> | |
</Grid.ColumnDefinitions> | |
<CheckBox Grid.Row="0" Grid.Column="0" IsHitTestVisible="False" /> | |
<CheckBox Grid.Row="1" Grid.Column="0" IsHitTestVisible="False" /> | |
<CheckBox Grid.Row="2" Grid.Column="0" IsHitTestVisible="False" /> | |
</Grid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment