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

MDi for rad windows

7 Answers 397 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jamal Husien
Top achievements
Rank 1
Jamal Husien asked on 01 Apr 2010, 01:35 PM
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.

7 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 01 Apr 2010, 04:28 PM
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.
0
Jamal Husien
Top achievements
Rank 1
answered on 03 Apr 2010, 03:26 PM
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}
}

 

 

0
Miroslav Nedyalkov
Telerik team
answered on 06 Apr 2010, 09:34 AM
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.
0
Jamal Husien
Top achievements
Rank 1
answered on 06 Apr 2010, 10:56 AM
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
0
Miroslav Nedyalkov
Telerik team
answered on 06 Apr 2010, 12:11 PM
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.
0
Jamal Husien
Top achievements
Rank 1
answered on 06 Apr 2010, 01:23 PM
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.



0
Miroslav Nedyalkov
Telerik team
answered on 07 Apr 2010, 08:37 AM
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.
Tags
Window
Asked by
Jamal Husien
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Jamal Husien
Top achievements
Rank 1
Share this question
or