Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何从我的 Windows 8 应用程序中的无线电组中清除选择。我在想这样:
RadioButton.SelectedIndex = -1;
有谁知道如何做到这一点?谢谢。
尝试使用事件跟踪RadioButton当前选择的特定实例,并在需要清除组时Checked分配给该实例。IsChecked = false是的,这很痛苦……
RadioButton
Checked
IsChecked = false
您无法清除单选按钮的选择。如果您需要清除选择的能力,请考虑使用其他控件,例如CheckBox