单选按钮组 XAML单选、按钮、XAML

2023-09-06 22:06:40 作者:我一直在

我在 XAML 中有六个单选按钮,我想创建两个组.WPF 好像没有单选按钮组元素,我该怎么做呢?

I have six radio buttons in XAML, and I would like to create two groups. It seems that WPF has no radiobutton group element, so how can I do this?

推荐答案

你必须为元素指定一个 GroupName.

You have to specify a GroupName for the element.

 <RadioButton GroupName="Group1"/>
 
精彩推荐