MDi for rad windows

8 posts, 0 answers
  1. Jamal Husien
    Jamal Husien avatar
    43 posts
    Member since:
    Feb 2010

    Posted 01 Apr 2010 Link to this post

    Dear all
    can some one give simple code for makie mdi for radwindows
    (Multiple Document Interface (MDI) Design)

    i need to make an aplication that creates multi radwindow on the mainwindow.
    1.all the subwindow cannot go out of the mian page.
    2.when i activiate the main window all the sub window will still on the front.
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 01 Apr 2010 Link to this post

    Hello Jaml,

     What I would suggest you is to use the Docking control. For more information you could refer to the following demos page: http://demos.telerik.com/WPF/?Docking/FirstLook and the following help article: http://www.telerik.com/help/wpf/raddocking-overview2.html.

    Hope this helps.

    Sincerely yours,
    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. UI for WPF is Visual Studio 2017 Ready
  4. Jamal Husien
    Jamal Husien avatar
    43 posts
    Member since:
    Feb 2010

    Posted 03 Apr 2010 Link to this post

    hello
    thanks, but i need to use radwindow and not docking.
    can you please give me an example how to do it.


    i have this code

    <Window  .....  >
    <Grid>

    <

     

    Button Height="23" Margin="290,47,240,0" Name="button1" VerticalAlignment="Top" Click="button1_Click_1">Button</Button>

     

    </Grid><Window>


    on the code

     

    private void button1_Click(object sender, RoutedEventArgs e){
    RadWindow tmp1=new RadWindow();
    tmp1.Width=150;tmp1.Height=150;
    tmp1.Show();
    tmp1.IsRestricted=true;
    //tmp1.RestrictedAreaMargin={what to write here and what on the xaml file}
    }

     

     

  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 06 Apr 2010 Link to this post

    Hi Jaml,

     The RestrictedAreaMargin property is of type Thickness and it represents the margin from the edges of the screen (if this is a WPF desktop application) or the edges of the browser (if this is a browser application - XBAP). What you need to do is to calculate these offsets and update them every time the area changes its relative location.

    Hope this helps!

    All the best,
    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. Jamal Husien
    Jamal Husien avatar
    43 posts
    Member since:
    Feb 2010

    Posted 06 Apr 2010 Link to this post

    hi
    realy i didnot undrestand your answer.
    --this is a WPF desktop application.
    what i need to write on the code (C#) on event onclick
    and what i need to write on {<window ....> <Grid> what i need to write here  .</Grid></window >
    thanks
  7. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 06 Apr 2010 Link to this post

    Hello Jaml,

     You don't need to write anything specific in XAML, but in C# you need to set the desired margin from the screen. The code should look like this:

    window.RestrictedAreaMargin = new Thickness { Left = leftMargin, Top = topMargin, Right = rightMargin, Bottom = bottomMargin };

    Where leftMargin is the offset of the restricted area from the left side of the screen, topMargin - the offset of the top of the screen and etc.

    If you need to make the restricted area to match a visual element into your window it could very complicated to calculate it. This feature is designed for other purposes (for example restricting a static area on the screen like a taskbar).

    Hope this helps!

    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.
  8. Jamal Husien
    Jamal Husien avatar
    43 posts
    Member since:
    Feb 2010

    Posted 06 Apr 2010 Link to this post

    thanks
    but it is not working, i donot get the answer for my Question!.
    i have simple Aplication main window and one button when i click the button new radwindow will be open.

    problems:
    1.when i click outside the radwindow the rad window disaper ( it go behind the main window).
    2.the radwindow can go out of the main window i need to move/handle the rad window it will stay onside of the main window.

    please please give me answer for me question i have lost 5 days only for these simple request that i can make it easy on Programs.
    i put the project on the attachment.



  9. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 07 Apr 2010 Link to this post

    Hi Jamal,

     I answered you on the other forum thread you posted (http://www.telerik.com/community/forums/wpf/window/topmost-for-radwindow.aspx) and attached a project that demonstrates how to solve most of the issues. It doesn't solve the problem with the restricted area, because I couldn't understand what is your requirement. What exactly do you need to achieve - to have an area in your main window, where the windows can be dragged around and cannot be dragged out of it, or area where the windows cannot be dragged into.

    The reason why you are having troubles using the RadWindow for your scenario is that it is not designed to be used for this.

    Hope this helps!

    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.
Back to Top
UI for WPF is Visual Studio 2017 Ready