WPF - 屏幕顶部的Metro对话设置(mahapps)?

时间:2015-04-17 12:42:01

标签: c# wpf mahapps.metro

我有一个WPF应用程序,我使用metro dialog来显示消息。我可以在窗口顶部显示消息吗?我可以修改popup的位置吗?

1 个答案:

答案 0 :(得分:2)

我找到了一种方法:

try
{
     var mySettings = new MetroDialogSettings
     {
         AffirmativeButtonText = "Yes"
     };

     var cd = new CustomDialog
     {
         VerticalAlignment = VerticalAlignment.Top,
         VerticalContentAlignment = VerticalAlignment.Top
     };

     await DialogManager.ShowMetroDialogAsync(this, cd, mySettings);
}
catch (Exception ex)
{
}