问题描述
|
我正在使用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();
};