【问题标题】:Modal RadWindow with vb.net and WPF带有 vb.net 和 WPF 的模态 RadWindow
【发布时间】:2012-07-31 20:55:58
【问题描述】:

当我尝试使用此代码打开模式 Radwindow(VB.NET、WPF、Web 应用程序)时:

Dim x as new RadWindow
x.content = MyContenctControl (UserControl)
x.Owner = me
x.ShowDialog

第 3 行给我一个来自 VB.NET (Me) 的隐式对象的错误

错误 1 ​​类型“myProject.Main”的值无法转换为 'System.Windows.Controls.ContentControl'。 C:\ .... \项目\ 我的项目\我的项目\ Main.xaml.vb 100 57我的项目

我怎么能负担得起,所以主窗体 (Me) 可以通过值“ByVal”方法传递,然后将其分配给 Radwindow 的 Owner 属性。

谢谢

【问题讨论】:

    标签: .net wpf vb.net web-applications radwindow


    【解决方案1】:

    我认为这应该可行:

    x.Owner = Application.Current.MainWindow
    

    【讨论】:

      猜你喜欢
      • 2011-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-24
      • 1970-01-01
      • 2013-11-24
      • 2021-12-17
      • 2012-12-27
      相关资源
      最近更新 更多