views:

716

answers:

1

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
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
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
And I'd like to do it for CheckBoxes as well, which should have the same solution.
Bryan Anderson
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
Thanks a ton, your answer combined with a Multibinding and StringFormat got me exactly what I needed.
Bryan Anderson