This project is read-only.

back button for InputPrompt

Apr 24, 2011 at 9:10 AM

Creating a new thread to follow up on discussion started in

quoted text from previous thread:

Your second question should really be a new thread.  Back buttons will cancel out of the prompt.  It will cause the prompt to fire off the completed event but you can determine it is a cancel event by the PopUpEventArgs

via something like:  e.PopUpResult ==


If you look at the prompts.xaml.cs in the test application, you can see examples of this.



I missed it before, but this is indeed the case when pressing the back button twice.

1st time: it clear the SIP

2nd time: it fire the completed event with cancel event

Is it possible to unite these two actions to one - I assume the user expect to clear the prompt when he press the back button for the 1st time.

Make sense?


Apr 25, 2011 at 12:16 AM

What you're asking for makes sense, not sure if it is possible however.  I can detect backkey press at a page level, but doesn't seem like I can detect it on the textbox.  Only way I found to detect if something was up was a LostFocus event.  Doing a LostFocus doesn't seem to provide enough scope since pressing the ok/cancel buttons causes that to fire as well.  So does pressing on the control.  I think i can manage the pressing OK / Cancel but not being able to tell the different between a Grid press and a backkey would cause an issue.  Doing a BackKeyPress on the page level doesn't detect the SIP Keyboard dismissal.

More so, LostFocus gets fired before the OnComplete event. 

As you can see, stuff starts to get hairy quickly.  I'll keep an eye out for it but as of now, I don't think this is possible.  If you know how to detect this with the needed scope resolution for the best end user experience, please share.