silverlight 5开发【vb版】(9)- RadioButton和ListBox
程序员文章站
2022-03-02 11:47:18
...
Partial Public Class MainPage Inherits UserControl Public Sub New() InitializeComponent() End Sub Private Sub RadioButton1_Checked(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles RadioButton1.Checked Label1.Content = RadioButton1.Content listbox_add(Label1.Content) End Sub Private Sub RadioButton2_Checked(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles RadioButton2.Checked Label1.Content = RadioButton2.Content listbox_add(Label1.Content) End Sub Private Sub RadioButton3_Checked(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles RadioButton3.Checked Label1.Content = RadioButton3.Content listbox_add(Label1.Content) End Sub Private Sub listbox_add(stritem As String) ListBox1.Items.Add(stritem) End Sub End Class
对于RadioButton来说,GroupName一致即它们之一只能有一个被选中
推荐阅读
-
silverlight 5开发【vb版】(6)-鼠标滚轮事件
-
silverlight 5开发【vb版】(11)- 样式与模板
-
silverlight 5开发【vb版】(12)-数据和RIA基础(2)
-
silverlight 5开发【vb版】(7)-silverlight 5开发工具包ISO
-
silverlight 5开发【vb版】(12)-数据和RIA基础(1)
-
silverlight 5开发【vb版】(5)-鼠标左右键事件
-
silverlight 5开发【vb版】(3)-简单鼠标事件处理
-
silverlight 5开发【vb版】(4)-容器
-
silverlight 5开发【vb版】(10)- 布局控件
-
silverlight 5开发【vb版】(3)-简单鼠标事件处理