C# 如何在windows phone应用程序中重置单选按钮的边框厚度?
单选按钮的xaml代码为C# 如何在windows phone应用程序中重置单选按钮的边框厚度?,c#,xaml,windows-phone,radio-button,C#,Xaml,Windows Phone,Radio Button,单选按钮的xaml代码为 <RadioButton x:Name="RadioButton1" BorderBrush="#b2b2b2" IsChecked="true" Foreground="Black" BorderThickness="0.5" Background="White" Content="Taxable" HorizontalAlignment="Left" Height="78" Margin="0,0,0,0" Width="164"/> 但无论我给
<RadioButton x:Name="RadioButton1" BorderBrush="#b2b2b2" IsChecked="true" Foreground="Black" BorderThickness="0.5" Background="White" Content="Taxable" HorizontalAlignment="Left" Height="78" Margin="0,0,0,0" Width="164"/>
但无论我给出的值是多少,边界厚度都没有变化。
如何解决此问题,我只想更改单选按钮的边框厚度(仅供参考-Borderbrush工作正常)。如果要更改,您需要重新安装
单选按钮
默认模板的背景圆定义如下:
<Ellipse x:Name="CheckBackground" Fill="{TemplateBinding Background}"
HorizontalAlignment="Left" Height="25.5" IsHitTestVisible="False"
Stroke="{TemplateBinding BorderBrush}"
StrokeThickness="{ThemeResource PhoneStrokeThickness}"
VerticalAlignment="Center" Width="25.5"/>
请注意,StrokeThickness
属性设置为ThemeResource
,而不是Stroke
的模板绑定方式。试试这个
<Border BorderBrush="#b2b2b2" BorderThickness="10.0" Width="164">
<RadioButton x:Name="RadioButton1" IsChecked="true" Foreground="Black" Content="Taxable" HorizontalAlignment="Left" Height="78" Margin="0,0,0,0" Width="164"/>
</Border>