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

Cannot get startet with RadWindow

6 Answers 72 Views
Window
This is a migrated thread and some comments may be shown as answers.
Patrick Schärer
Top achievements
Rank 1
Patrick Schärer asked on 17 Mar 2010, 12:03 PM
Hi.
While trying to get started with the RadWindow I'm quite confused and don't happen to run it. Where should I place the rad window?
1. Usually I had expected to make it a user control (create a new user control and replace UserControl with telerik:RadWindow)

 

<telerikNavigation:RadWindow x:Class="Opas1.Views.RadWindow1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
    mc:Ignorable="d" 
    d:DesignHeight="300" d:DesignWidth="400">  
      
    <Grid x:Name="LayoutRoot" Background="White">  
 
    </Grid>  
</telerikNavigation:RadWindow> 

but it says The tag 'RadWindow' does not exist in XMLL namespace 'clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation'.

2. If I should place it in an existing User Control, where to place it and make it visible? As this RadWindow should be independent from its calling User Control?

6 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 19 Mar 2010, 01:55 PM
Hello Patrick,

 You have three opportunities:

1. To create a UserControl and change the root tag to RadWindow, go to code-behind and change the class to inherit from RadWindow instead of UserControl (the approach you described). If this doesn't work, could you please send us a sample project - this will let us investigate what the problem is?

2. To create a UserControl that will represent the content of the Window and when you need to show the window you could create a window, create an instance of your UserControl, add it as a content of the window and call its show method.

3. We don't recommend this, but it is still possible - you could create your Window in any XAML file and call its Show or ShowDialog method. In this case you should be careful with the Name property you set to the Window control, because all shown windows share the same name scope.

Regards,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Darren Stoppler
Top achievements
Rank 1
answered on 23 Apr 2010, 05:27 PM
Hi Miroslav ,

I tried option 3 and when I call the Show(), I get "Element is already the child of another element".

Do you know what the problem is?

Thanks
0
Miroslav Nedyalkov
Telerik team
answered on 23 Apr 2010, 06:05 PM
Hi Darren,

 We are not aware of such a problem. You could send us a sample project that reproduces the issue - this will help us better understand what the problem is.

As I said we don't recommend the option you picked. We do so, because a numerous issues could appear because of the way you declare your window.

Best wishes,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Darren Stoppler
Top achievements
Rank 1
answered on 23 Apr 2010, 09:00 PM
Hi Miroslav,

Thanks for your reply.

I have changed the way this works to be as your example 2 describes.  I followed your help file to do this.  One issue seems to be that if I need more than one instance of that particular window with the specific content, I can only have one instance of it.  I would like to create another window object of that same screen and issue a .Show() for that particular instance. For example, I would like a form to hold the name and address of a client and for the user to be able to open multiple client records concurrently.

I hope that my question is understandable!

Thanks
0
Darren Stoppler
Top achievements
Rank 1
answered on 23 Apr 2010, 09:28 PM
I suppose a better way to ask this, is can the following be done programatically:-

<RadWindow x:Name="window">
   
<DatePickerUserControl />
</
RadWindow>

This is from your example in the help file but if I could create a window and point the content to a user control programatically, it would solve my problem.

Thanks
0
Darren Stoppler
Top achievements
Rank 1
answered on 24 Apr 2010, 01:36 AM
I found some code on the forum for this and I'll try that...

Thanks
Tags
Window
Asked by
Patrick Schärer
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Darren Stoppler
Top achievements
Rank 1
Share this question
or