
Hi,
We have a ribbon window with a wizard page with a text box and to validate it we have placed validation code on lostfocus event of the text box, also we do not want to validate on Cancel click of the wizard.
For above requirement we have placed valiadtion code in PreviewLostKeyboardFocus event of the text box and placed a check that if the newfocus is PART_CancelButton do not fire the validation.
Now, if focus is in text box and we click on Cancel it all works fine. However if we use shorcut ALT-C to cancel wizard, there are two issues.
1) In PreviewLostKeyboardFocus event the new focus is not set to PART_CanccelButton.
2) PreviewLostKeyboardFocus focus is called twice.
Because of above two issues the validation message which should not fire at all on Close button click is firing two times.
How to deal with this. Is this an issue with window/wizard and are there any workaround we can implement ?
Thanks in advance,
Anurodh
We have a ribbon window with a wizard page with a text box and to validate it we have placed validation code on lostfocus event of the text box, also we do not want to validate on Cancel click of the wizard.
For above requirement we have placed valiadtion code in PreviewLostKeyboardFocus event of the text box and placed a check that if the newfocus is PART_CancelButton do not fire the validation.
Now, if focus is in text box and we click on Cancel it all works fine. However if we use shorcut ALT-C to cancel wizard, there are two issues.
1) In PreviewLostKeyboardFocus event the new focus is not set to PART_CanccelButton.
2) PreviewLostKeyboardFocus focus is called twice.
Because of above two issues the validation message which should not fire at all on Close button click is firing two times.
How to deal with this. Is this an issue with window/wizard and are there any workaround we can implement ?
Thanks in advance,
Anurodh