Reputation: 491
I've radio buttuons in my WP-8 application.
All contents of my radiobuttons are overlapping. I've fixed height and width but words are not wrapping to second line. How can I solve this problem?
Please do not say something like "\n" content is dynamic.
Upvotes: 3
Views: 1103
Reputation: 1892
You are probably setting text to Content
property as a string. But you can also use TextBlock
.
XAML
<RadioButton>
<TextBlock Text="This is very long text that I want to wrap. Is it long enough?"
TextWrapping="Wrap"/>
</RadioButton>
C#
RadioButton rb = new RadioButton();
rb.Content = new TextBlock()
{
Text = "This is very long text that I want to wrap. Is it long enough?",
TextWrapping = TextWrapping.Wrap,
};
Result
Upvotes: 4