110,535
社区成员
发帖
与我相关
我的任务
分享
#Region "TextChanged"
Private Sub UserName_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Input.KeyEventArgs) Handles UserName.KeyUp
UserNameTextChanged()
End Sub
Private Sub UserName_LostFocus(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles UserName.LostFocus
UserNameTextChanged()
End Sub
Private Sub UserName_PreviewTextInput(ByVal sender As Object, ByVal e As System.Windows.Input.TextCompositionEventArgs) Handles UserName.PreviewTextInput
UserNameTextChanged()
End Sub
Private Sub UserNameTextChanged()
If UserName.Text Is Nothing Then
Else
If UserName.Text.Trim = String.Empty Then
ButtonRemove.Visibility = Windows.Visibility.Hidden
Else
For Each Item In UserName.Items
If Item = UserName.Text.Trim Then
ButtonRemove.Visibility = Windows.Visibility.Visible
Else
ButtonRemove.Visibility = Windows.Visibility.Hidden
End If
Next
End If
End If
End Sub
#End Region