lundi 11 janvier 2016

Set CheckBox on all space of Grid Cell

    <Grid Margin="0,0,0,35" Background="Transparent">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Name="OverclosingWrap" Width="280" />
                    <ColumnDefinition Width="280" />
                </Grid.ColumnDefinitions>
                <CheckBox Margin="0,0,10,0" HorizontalAlignment="Center" Grid.Column="0" Style="{StaticResource CheckBoxStyleWhite}" Content="Over clothing " FontFamily="Segoe UI Semibold" FontSize="18" Foreground="#ffffff" Name="OverClothingCheckBox" IsChecked="True" Checked="OverClothingCheckBox_OnChecked" Unchecked="OverClothingCheckBox_OnChecked"/>
                ...
    </Grid>

Well, I have Grid with 2 Columns. In First I have checkBox with Text. I want to make this CheckBox on all space of 1st Column. Why ? - I want to make larger clickable area for checkBox.

Setting just Aligment to checkBox doesn't help me - HorizontalAligment="Stretch" make checkbox be aligned to left, what is wrong for me.




Aucun commentaire:

Enregistrer un commentaire