![]() ![]() String text = (4, " ") ĬardNoTextBox.Select(, 0) In code behind (xaml.cs): private void CardNoTextBox_TextChanged(object sender, RoutedEventArgs routedEventArgs) Is there any easier way to do this without creating any UserControl? While searching for a solution on the internet I found the only way by customizing the TextBox with the help of an UserControl. I am not using a PasswordBox because the defined InputScope is "Number" which is not possible in a PasswordBox. How can I hide the characters as user gives input? Erreur: la superclasse, « animal», n'a pas de constructeur non nommé qui ne prend pas d'arguments.I am using a TextBox control for the user input in my Windows Phone 8.1 app.The video, sound and picture are not synchronized in potplayer.Error: The superclass, ‘Animal‘, has no unnamed constructor that takes no arguments.Source code analysis of Alibaba middleware Seata VII: implementation of Saga mode.Talk about the timeout and retry of openfeign.Talk about openfeign and its source code.Logical blank filling of speech comprehension in the national examination.In depth analysis of ribbon source code.cs61b week3 - Subtype Polymorphism vs.Le jeu de caractères de la conception de la base de données est utf8 et la table est utf16.Talk about the mainstream distributed database.SeePwd.AddHandler(Button.MouseLeftButtonUpEvent, new MouseButtonEventHandler(this.SeePwd_MouseLeftButtonUp), true) SeePwd.AddHandler(Button.MouseLeftButtonDownEvent, new MouseButtonEventHandler(this.SeePwd_MouseLeftButtonDown), true) When the page of the program is initialized AddHandler Method. In the initialized function UIElement Of AddHandler Method, Explicitly add this event. therefore, If you must use this event, You need to use. also, Control's own Click event, Is equivalent to MouseLeftButtonDown Event suppression (Supress) It fell off, Transformed into Click event. Control captured MouseLeftButtonDown After the event, The event will be “Handled” Set to True, This property is used in event routing, When a control gets a RoutedEvent, Will detect Handled Is it true, by true Then ignore the event. Looked at some information, Only then did I know that this is a question of design principle. If you write normally, The program cannot respond to this event, After hitting the breakpoint, I found that I didn't leave the event at all. Public void ButtonDown(PasswordBox pwd, TextBox txt) Public void ButtonUp(PasswordBox pwd, TextBox txt) The specific code is encapsulated into a tool class Private void SeePwd_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) Private void SeePwd_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) The code is as follows // Press the small eye button and talk about the event ![]() Principle : By lifting and pressing the eye button, Let the position follow passwordbox Overlapping textbox Show it, And let passwordbox The data shows textbook Control. The definition here MouseLeftButtonDown and MouseLeftButtonUp event Here I use the next eye button to help passwordbox Control displays its original password. Can only be seen through certain auxiliary events. ![]() PasswordBox Control itself has no way to display the text entered by itself. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |