In WinRT api, how to accept user input in a dialog just like in Weather and Finance apps

Mani picture Mani · Jul 21, 2012 · Viewed 9.6k times · Source

I am trying to display a dialog that allows the user to type a location, just like in the "add places" function of the Weather App on Windows 8.

Windows.UI.Popups namespace does not have an appropriate control. It has the MessageDialog, but I don't think it can be customised to include a textbox in it.

Would I need to use Windows.UI.XAML.Controls.Primitives.Popup control by any chance?

The input dialog in Weather App on Windows 8

Answer

Nigel Sampson picture Nigel Sampson · Jul 22, 2012

There is no out of box control beyond Popup to handle this style of UI, the Callisto library uses this control quite a bit so it has a lot of good examples of it's usage.

Edit: In fact now the Callisto library has the CustomDialog control to help you do exactly this.