I'm using WPF, and I have a CheckBox element with associated text/content. I've changed the FlowDirection to be RightToLeft so that the checkbox appears to the right of the text. But it appears very close to the text. I'd like to increase the spacing between the text and the checkbox, but of course the Margin option changes the outside margins of the whole control. Thanks for any ideas.
<CheckBox IsChecked="True" HorizontalAlignment="Left" FlowDirection="RightToLeft">Activate</CheckBox>
Use margin-right .
If the intent of the user is to bring some more space between check box "box" and its corresponding text, you can use "&npsp;" in the Text content of the checkbox. Hope that helps.
The checkbox is labeled by the 'Text' property. In my tests, text alignment property is not set so it defaults to 'right'. When rendered in compatibility mode, there is something like 2-4 pixels of blank space between the checkbox itself and its text label.
This should work too:
<CheckBox>
<TextBlock Margin="10 0 0 0">Activate</TextBlock>
</CheckBox>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With