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

Owner property

3 Answers 133 Views
Window
This is a migrated thread and some comments may be shown as answers.
Xin
Top achievements
Rank 1
Xin asked on 08 Jun 2012, 01:56 PM
Hi:

I tried to set RadWindow.Owner to a Widnow,

this

 

 

.Owner = Application.Current.MainWindow;

 


but it is said
Error 1 Cannot implicitly convert type 'System.Windows.Window' to 'System.Windows.Controls.ContentControl'.

Is there a way to set Owner property to a Window?
Could anyone help me with this one?

Thanks
Xin

3 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 12 Jun 2012, 10:57 AM
Hi,

The Owner property should be set to a ContentControl, for example:

this.Owner = Application.Current.MainWindow.Content as ContentControl;


Kind regards,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Xin
Top achievements
Rank 1
answered on 12 Jun 2012, 03:08 PM
Hi Konstantina:
 
Thanks for your reply.
But when I tried your code, it said:
'System.Windows.Window' do not contain a definition for 'Content' and no extension method accepting a first argument of type 'System.Windows.Window' could be found.

How can I correct it?

Regards
Xin
0
Konstantina
Telerik team
answered on 13 Jun 2012, 02:54 PM
Hi Xin,

Sorry for the misunderstanding.

The Owner property in Silverlight is not designed to point which out-of-browser Window will be the owner, but which RadWindow will be owner of the newly created one. Also, even if set to a RadWindow it will only close the owned window, but not set its Z index. This is how the property is designed. This issue is logged in PITS - you could view it here, vote for it and track its status. It is logged under the RadDocking control, but the concern is the same.

Hope this information helps.

All the best,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Window
Asked by
Xin
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Xin
Top achievements
Rank 1
Share this question
or