I’m working on a Windwos Phone 7 project, where I would like to have a native messagebox, like the simple MessageBox.Show( ) function, only where I can add a few buttons, like “yes” and “no”. Everything I found thus far uses an open-source solution, such as custom Message Box. Is there nothing native to WP7 like this?
Share
Sadly not. The standard MessageBox only allows for a very limited set of pre-defined button combinations. If you want to roll your own, the
Popupcontrol can be configured to look like the inbuilt MessageBox control, but with the option to display whatever you like inside it.(Quick and dirty example)
You may want to add some haptic feedback when you set
RateAnswerPopup.IsOpen=true;as a cue that the box has appeared, but that’s up to you.