This is a migrated thread and some comments may be shown as answers.

Problem calling a modal RadWindow

0 Answers 99 Views
Window
This is a migrated thread and some comments may be shown as answers.
Romell
Top achievements
Rank 1
Romell asked on 31 Jul 2012, 04:34 PM
Hi,

I have an structure like this:

MAinProject with a Custom WindowsClass and a Custom User control

From the main form called "Main" class is instantiated "WindowsClass". This class through a method call generates a window Radwindow type whose content is a custom user control.

Then from the main form made ​​the call to WindowsClass class method as follows:

myClassWindow.AddObjectWindow (objectName, Me)

This command fails me with the implicit object from VB.NET (Me)

The definition of the above method is as follows:

Public Sub AddObjectWindow (ByVal objectName As String, ByVal Owner As System.Windows.Controls.ContentControl)

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

1 - Why is this?
2 - 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.

I hope I have explained the issue as best as possible ....

No answers yet. Maybe you can help?

Tags
Window
Asked by
Romell
Top achievements
Rank 1
Share this question
or