简体   繁体   中英

MahApps.Metro ToggleSwitch Focus issues

I am using the ToggleSwitch from MahApps.Metro as a signoff for my textbox. Basically, once the TextBox is valid, the ToggleSwitch will disable the TextBox. My TextBox has its UpdateSourceTrigger set to LostFocus because I am using a converter and need to wait until the user is finished to make sure it is completely valid. The ToggleSwitch has its UpdateSourceTrigger set to PropertyChanged for the IsChecked property.

What is happening is when I type into my TextBox and then click the ToggleSwitch, my LostFocus never fires for my TextBox and my property is never set. I tested this out by changed the ToggleSwitch to a CheckBox and that fired my LostFocus and my property was set before the IsChecked property was updated. Any idea why the ToggleSwitch is not taking focus away from my TextBox?

MahApps.Metro (> v1.1.2)的最新Alpha版似乎已解决了此问题,也可以通过NuGet获得。

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