簡體   English   中英

應用事件句柄時RadWindow.Confirm丟失主題

[英]RadWindow.Confirm Loses Theme when EventHandle Applied

當按下我的按鈕時,出現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中實現

但是,如果您將事件放入DialogParameters中,它將起作用!

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM