简体   繁体   中英

GotFocus event of TextBox is not firing

I'm using Windows.UI.Xaml.Controls.TextBox developing Universal Windows App. When text box is enabled GotFocus event normally fired. Otherwise when it is disabled I can't detect user interactions with it. Somehow I need to know that user is trying to access the text box and notify him why he can't do so. Also I have tried to use Tapped event - no success.

A disabled textbox won't fire the GotFocus event (or any other events, from what I can see).

Consider setting the IsReadOnly property to true instead of disabling the whole element. Then events will still be able to fire.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM