在 WinRT api 中,如何在对话框中接受用户输入,就像在天气和财务应用程序中一样 [英] In WinRT api, how to accept user input in a dialog just like in Weather and Finance apps

查看:8
本文介绍了在 WinRT api 中,如何在对话框中接受用户输入,就像在天气和财务应用程序中一样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试显示一个允许用户键入位置的对话框,就像在 Windows 8 上的天气应用程序的添加地点"功能中一样.

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 命名空间没有适当的控件.它有 MessageDialog,但我认为不能对其进行自定义以在其中包含文本框.

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.

我是否需要使用 Windows.UI.XAML.Controls.Primitives.Popup 控件?

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

推荐答案

除了 Popup 之外没有开箱即用的控件来处理这种风格的 UI,Callisto 库经常使用这个控件,所以它有很多很好的使用示例.

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.

事实上,现在 Callisto 库有 CustomDialog 控件可以帮助您做到这一点.

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

这篇关于在 WinRT api 中,如何在对话框中接受用户输入,就像在天气和财务应用程序中一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆