![](/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.