Cannot get startet with RadWindow

7 posts, 0 answers
  1. Patrick Schärer
    Patrick Schärer avatar
    8 posts
    Member since:
    Mar 2010

    Posted 17 Mar 2010 Link to this post

    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?

  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 19 Mar 2010 Link to this post

    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.
  3. DevCraft banner
  4. Darren Stoppler
    Darren Stoppler avatar
    36 posts
    Member since:
    Apr 2010

    Posted 23 Apr 2010 Link to this post

    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
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 23 Apr 2010 Link to this post

    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.
  6. Darren Stoppler
    Darren Stoppler avatar
    36 posts
    Member since:
    Apr 2010

    Posted 23 Apr 2010 Link to this post

    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
  7. Darren Stoppler
    Darren Stoppler avatar
    36 posts
    Member since:
    Apr 2010

    Posted 23 Apr 2010 Link to this post

    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
  8. Darren Stoppler
    Darren Stoppler avatar
    36 posts
    Member since:
    Apr 2010

    Posted 23 Apr 2010 Link to this post

    I found some code on the forum for this and I'll try that...

    Thanks
Back to Top
DevCraft banner