I have a multiline radio button and I want the bullet to be to the left of the content (as default) aligned to the top of the radio button control. What's the easiest way to do this in XAML?
+1
A:
Override the Control.Template for the RadioButton. Here is the example from MSDN Radio Button Control Template Example
If you don't want to override the Control.Template for the radio button you can make the content a Wrapped TextBlock. see this sample
<RadioButton Name="radioButton1">
<TextBlock TextWrapping="Wrap">Here is some multiline text that does some wrapping</TextBlock>
</RadioButton>
bendewey
2009-02-10 19:19:57
I was hoping to do it without needing to override the Radio Button template since the alignment is the only thing I want to change.
Bryan Anderson
2009-02-10 19:32:08
Do you want the radio button to sit on top of the text or do you want to have the radio button side-by-side with the button aligned on top of the row (like next to a paragraph)?
bendewey
2009-02-10 19:34:05
And I'd like to do it for CheckBoxes as well, which should have the same solution.
Bryan Anderson
2009-02-10 19:34:24
I don't know of any property that lets you do either of those designs. I would use templating for that. I'll do some snooping though (http://blois.us/Snoop/)
bendewey
2009-02-10 19:44:43
Thanks a ton, your answer combined with a Multibinding and StringFormat got me exactly what I needed.
Bryan Anderson
2009-02-10 20:48:44