欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

 
silverlight 5开发【vb版】(9)- RadioButton和ListBox
            
    
    博客分类: .net&silverlight  
 对于RadioButton来说,GroupName一致即它们之一只能有一个被选中

  • silverlight 5开发【vb版】(9)- RadioButton和ListBox
            
    
    博客分类: .net&silverlight  
  • 大小: 17.3 KB