添加文本框在WinRT中MessageDialog

编程入门 行业动态 更新时间:2024-10-11 13:30:43
本文介绍了添加文本框在WinRT中MessageDialog的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在Windows工作8商店应用程序,我想弹出一个对话框,让用户在一个文本框,例如输入信息。

I'm working in windows 8 store application and I'm trying to popup a dialog to let the user enter information in a textbox for example.

如何做到这一点?

推荐答案

的 显示InputDialog 在WinRT的XAML工具包的控制做到了这一点。它基本上是一个弹出式窗口控制文本框和一些按钮。有样本为它了。最基本的人做这样的:

The InputDialog control in WinRT XAML Toolkit does just that. It is basically a Popup control with a TextBox and some buttons. There is a sample for it too. The most basic one does this:

var dialog = new InputDialog(); var result = await dialog.ShowAsync( "This is the title", "This is the content/message", "Option 1", "Option 2", "Option 3");

其结果是,用在被点击的按钮字符串 - 例如选项1。

The result is the string that is used on the button that was clicked - e.g. "Option 1".

更多推荐

添加文本框在WinRT中MessageDialog

本文发布于:2023-08-06 14:38:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1313025.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本框   WinRT   MessageDialog

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!