Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I know how to measure the size of the text, but when I increase the Size of RadioButton show me the text in one line. Is it possible to create multi-line RadioButton?
It's a compact framework 3.5.
Posted
Updated 15-Jun-11 2:01am
v2

You may use this ways:

XML
<RadioButton Width="80">
    <RadioButton.Content>
        <TextBlock>
        <Run>First line</Run>
        <LineBreak></LineBreak>
        <Run>Second line</Run>
        </TextBlock>
    </RadioButton.Content>
</RadioButton>
<RadioButton Width="80">
    <RadioButton.Content>
        <TextBlock TextWrapping="WrapWithOverflow">Very very long text</TextBlock>
    </RadioButton.Content>
</RadioButton>
 
Share this answer
 
Hello Dear
if you want to MultiLine text of a Radiobutton , it means if you want to show text of a RadioButton in some lines instead of one line , It is easy set AutoSize property of Radiobutton to false then increase height of RadioButton and decrease width of it
 
Share this answer
 
Comments
Drazen Pupovac 15-Jun-11 8:23am    
It is compact framework, I don't have AutoSize property. It is not a problem how to change Size, problem is they can not increase radiobutton height. I make that if I put "\r\n" in radiobutton label text, but in that case second label line is black.

With width is ok.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900