【问题标题】:RadWindow.Alert getting hidden while switching between apps or Tab+AltRadWindow.Alert 在应用程序或 Tab+Alt 之间切换时被隐藏
【发布时间】:2014-06-17 20:47:02
【问题描述】:

我有必要创建 RadWindow.Alert,当我在应用程序之间切换或按 Tab+Alt 时,我看到这个 radwindow 被隐藏了。什么是解决方案?

【问题讨论】:

    标签: .net wpf winforms mvvm telerik


    【解决方案1】:
    var topWindow = Application.Current.Windows.Cast<Window>().FirstOrDefault(win => win.Topmost);
    
    Application.Current.Dispatcher.BeginInvoke(new Action(() => RadWindow.Alert(new DialogParameters
                                                                               {
                                                                                   Content = "write your comment",
                                                                                   Header = "type header here",
                                                                                   DialogStartupLocation = WindowStartupLocation.Manual,
                                                                                   Left = targetX,
                                                                                   Top = targetY,
                                                                                   Owner = topWindow ?? Application.Current.MainWindow
                                                                               })));
    

    【讨论】:

      猜你喜欢
      • 2012-07-26
      • 2022-01-21
      • 1970-01-01
      • 2012-07-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-17
      相关资源
      最近更新 更多