Can't reduce the width of radio buttons

I have a windows phone project and I cannot resize the width of the radio button. What pushes my screen textblock

. 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

+3


source to share


1 answer


You can change MinWidth

, notWidth

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

      



Probably need to shrink the margins on the TextBlock as well. Hope it helps

+8


source







All Articles