如何解决以编程方式关闭WP7 Coding4Fun工具包MessagePrompt Control
| 我正在使用Coding4Fun工具包中的MessagePrompt控件在我的应用程序中显示\“ Rate and Review \”对话框。 我已用自定义按钮替换了默认按钮,并清除了现有按钮(以消除刻度和叉号),但无法弄清楚调用哪种方法来关闭提示。 这是我正在使用的代码,我想关闭取消按钮的click方法中的提示var messagePrompt = new MessagePrompt
{
Title = \"Rate and Review\",IsAppBarVisible = false,Body = new TextBlock
{
Text = \"PLS REVIEW MY APP K THNX\",textwrapping = textwrapping.Wrap
}
};
var rateButton = new Button() { Content = \"Rate and Review\" };
rateButton.Click += (sender,e) =>
{
var m = new MarketplaceDetailTask
{
ContentIdentifier = Phonestate.AppID,ContentType = MarketplaceContentType.Applications
};
m.Show();
};
var cancelButton = new Button() { Content = \"dismiss\" };
cancelButton.Click += (sender,e) =>
{
//todo close messagePrompt here
};
messagePrompt.ActionPopUpButtons.Clear();
messagePrompt.ActionPopUpButtons.Add(rateButton);
messagePrompt.ActionPopUpButtons.Add(cancelButton);
messagePrompt.Show();
解决方法
该工具箱的最新签入公开了Hide()方法来解决此问题。
cancelButton.Click += (sender,e) =>
{
messagePrompt.Hide();
};
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。