![](/img/trans.png)
[英]Autocomplete box popup not showing in landscape mode in Windows phone 7.5
[英]Message Box yesnoButtons in windows phone 7.5
在窗口电话7.5。 我想在消息框中使用“是”没有按钮。 但是在消息框中没有选项是。 我该如何使用yes否按钮或其他替代按钮来显示字幕(OK =是,然后取消= no)请帮助我。
提前致谢。
您可以通过以下方式使用Coding4Fun MessagePrompt使用自定义按钮创建“是/否”消息:
MessagePrompt messagePrompt = new MessagePrompt();
messagePrompt.Message = "Some Message.";
Button yesButton = new Button() { Content = "Yes" };
yesButton .Click += new RoutedEventHandler(yesButton _Click);
Button noButton = new Button() { Content = "No" };
noButton .Click += new RoutedEventHandler(noButton _Click);
messagePrompt.ActionPopUpButtons.Add(noButton);
messagePrompt.ActionPopUpButtons.Add(yesButton );
messagePrompt.Show();
另一个选择是使用XNA框架中的Guide类。 有一个BeginShowMessageBox方法,使您可以选择传递按钮所需的任何字符串。
另一个选择是使用Coding4fun工具包中的MessagePrompt并根据需要进行自定义
是的,WP MessageBox的问题在于它仅支持OK和OKCancel MessageBoxButton,这意味着您只能使用“确定”按钮或“确定”和“取消”按钮。 不支持YesNo和YesNoCancel枚举值。
基本上,您可以尝试在页面内容上显示一个半透明的空白层,然后在其上方显示一个自定义消息框。 在这里 ,您可以找到完整的示例。
另一个选择是使用自定义库,例如Windows Phone Assets 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.