Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't lower Radio Button Width

I have a windows phone project and I can't resize the radio button width. Which is pushing my textblock off screen. Here is my Xaml code:

<StackPanel x:Name="spRadioSelection" Orientation="Horizontal" Margin="0,100" HorizontalAlignment="Stretch">
            <TextBlock Text="Staging" FontSize="24" Margin="30,20"></TextBlock>

            <RadioButton x:Name="rbStaging" GroupName="ProductionLevel" IsChecked="true" Checked="SelectionChangedHandler" Width="68"/>
            <RadioButton x:Name="rbLive" GroupName="ProductionLevel" IsChecked="false" Checked="SelectionChangedHandler"></RadioButton>
            <TextBlock Text="Live" FontSize="32" Margin="30,20"></TextBlock>
        </StackPanel>

And it looks like this:

enter image description here

like image 990
Mr. MonoChrome Avatar asked Aug 08 '26 17:08

Mr. MonoChrome


1 Answers

You can change the MinWidth rather than Width

 <RadioButton x:Name="rbStaging" GroupName="ProductionLevel"  
                 IsChecked="true" Checked="SelectionChangedHandler" MinWidth="68" />

Probably need to reduce the Margins on the TextBlock as well. Hope that helps

like image 137
SWilko Avatar answered Aug 10 '26 13:08

SWilko



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!