Xaml单选按钮

时间:2015-05-05 06:42:33

标签: c# xaml windows-phone-8.1

如何以编程方式在xaml中创建属于同一组的X个单选按钮...

单选按钮将基于来自服务器的响应,并且它们必须具有相同的组名

1 个答案:

答案 0 :(得分:2)

是的,在xaml中,您可以设置' GroupName' RadioButton的财产如下:

beforeEach(function () {
    page = new AngularPage();
});

如果您想通过响应创建它们,可以通过 C#代码而不是xaml来执行此操作:

<StackPanel>
    <RadioButton GroupName="Your group name" Content="Your content"/>
    <RadioButton GroupName="Your group name" Content="Your content"/>
    <RadioButton GroupName="Your group name" Content="Your content"/>
    <RadioButton GroupName="Your group name" Content="Your content" IsChecked="True"/>
</StackPanel>