我知道按钮,我可以这样做:
this.button1.Click += new System.EventHandler(this.button_Click);
但我怎么能用单选按钮呢?
答案 0 :(得分:7)
怎么样:
radioButton1.Click += new RoutedEventHandler(radioButton1_Click);
private void radioButton1_Click(object sender, RoutedEventArgs e)
{
}
答案 1 :(得分:3)
this.button1.Checked += ...
this.button1.Unchecked += ...