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

How to prevent user from dragging RadWindow off the screen

9 Answers 250 Views
Window
This is a migrated thread and some comments may be shown as answers.
Henri
Top achievements
Rank 1
Henri asked on 28 Aug 2009, 08:21 AM
Hi,

I am using the telerik controls version 2009.2.812.1030 for sl3.
I want to create an MDI like app. (Is there a sample available ?)
With RadWindow, the user can easily drag a radwindow off the screen and then he cannot drag it anymore because the title part of the radwindow is no longer on screen. What is the advised way to prevent this. Is there maybe a built in method/property?


Best regards,
Henri

9 Answers, 1 is accepted

Sort by
0
Henri
Top achievements
Rank 1
answered on 28 Aug 2009, 08:36 AM
Sorry, I found the property 'IsRestricted' to prevent the dragging off screen.
But the behaviour is different from what is done in your demo. Some tips on how to replicate this?
0
Hristo Borisov
Telerik team
answered on 28 Aug 2009, 10:23 AM
Hello Henri,

We don't have a demo that includes the IsRestricted property in our Quick Start Framework yet. What behavior do you expect from the IsRestricted property? Thank you for contacting us and we look forward to receiving your feedback.

All the best,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Henri
Top achievements
Rank 1
answered on 28 Aug 2009, 11:29 AM
Hi Hristo,
I expected something like being able to drag the windows out of the way so that a part of the header stays on the screen.
(so the user can still use the header to move the window )
Now, the restricted property constrains the window so that no part of it can go out of the screen.
 But I think that this limits the user too much when he wants to move one of several radwindows out of the way to make some room.
Maybe it is unclear what I am trying to say but as an example of a (for me) ideal behaviour can be observed in visual studio when e.g. you drag the output window. You can almost completely drag it of the screen, but not too much, thus allowing the window to be dragged back in place.

Best regards,
Henri
0
Miroslav Nedyalkov
Telerik team
answered on 31 Aug 2009, 07:20 AM
Hello Henri,

I would suggest you to set negative values to the RestrictedAreaMargin property. In this way the user will be able to drag the Window off the screen, but as much as you like to.

Hope this helps.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Henri
Top achievements
Rank 1
answered on 31 Aug 2009, 12:19 PM
Thank you. This helps.
Best regards,
Henri
0
yjh
Top achievements
Rank 1
answered on 26 Oct 2009, 01:03 PM
Henri said:

    Sorry, I found the property 'IsRestricted' to prevent the dragging off screen.
But the behaviour is different from what is done in your demo. Some tips on how to replicate this?

Yes, the url of demo is

http://demos.telerik.com/silverlight/#Window/FirstLook

I see the code, it doesn't use IsRestricted and RestrictedAreaMargin property, but still keep not whole radwindow header out of browser,so user can drag it back.

How to do it whithout using propertys about restricted?
0
Miroslav Nedyalkov
Telerik team
answered on 28 Oct 2009, 10:14 AM
Hi Yoa,

We didn't do anything in order to prevent the window to go out of the screen. It doesn't go out, because when you drag the mouse out of the Silverlight plugin it stops receiving mouse events. This is because the windowless mode of the examples application is activated.

All the best,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
alvin shih
Top achievements
Rank 1
answered on 24 Nov 2009, 02:20 AM
please elaborate on what do you mean by windowless mode?
maybe a code sample will do.
0
Miroslav Nedyalkov
Telerik team
answered on 24 Nov 2009, 04:11 PM
Hi Alvin,

This is a mode of the Silverlight plug. Please refer to the following help article: http://msdn.microsoft.com/en-us/library/cc838156(VS.95).aspx.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
Henri
Top achievements
Rank 1
Answers by
Henri
Top achievements
Rank 1
Hristo Borisov
Telerik team
Miroslav Nedyalkov
Telerik team
yjh
Top achievements
Rank 1
alvin shih
Top achievements
Rank 1
Share this question
or