RadWindow.Confirm在EventHandle应用时丢失主题

时间:2014-09-11 16:44:53

标签: c# wpf

按下我的按钮时,会出现RadWindow.Confirm。我想知道用户点击“确定”或“关闭/取消”时会执行的操作。我实现了一个new EventHandler但是它还原了我的主题,只显示了“Telerik.Windows.Controls.DialogParameters”,其内容是

恢复主题的代码:

RadWindow.Confirm(new DialogParameters
{
    Content = "Please confirm activation of the selected schedule",
    Header = "Activation Prompt",
    Theme = new Windows8Theme()}, 
    new EventHandler<WindowClosedEventArgs>(OnConfirmClosed));
}

主题代码

RadWindow.Confirm(new DialogParameters
{
    Content = "Please confirm activation of the selected schedule",
    Header = "Activation Prompt",
    Theme = new Windows8Theme()});
}

在MVVM中实现

1 个答案:

答案 0 :(得分:0)

但是如果你把Event放在DialogParameters中就行了!

RadWindow.Confirm(new DialogParameters
{
    Content = "Please confirm activation of the selected schedule",
    Header = "Activation Prompt",
    Theme = new Windows8Theme(),
    Closed = OnConfirmClosed
})