Domanda

When I try to open a modal Radwindow (VB.NET, WPF, Web Application) with this code:

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

The line 3 give me an error with the implicit object from VB.NET (Me)

Error 1 Value of type 'myProject.Main' can not be converted to 'System.Windows.Controls.ContentControl'. C: \ .... \ Projects \ MyProject \ MyProject \ Main.xaml.vb 100 57 myProject

how I can afford it, so the main form (Me) can be passed by value "ByVal" method and this in turn assigned to the Owner property of Radwindow.

Thanks

È stato utile?

Soluzione

I think this should work:

x.Owner = Application.Current.MainWindow
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top