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
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.
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}
}
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.
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
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.
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.