![](/forums/images/avatarimages/default.gif)
I am using the Docking control. I am using three RadPane controls in side a Dockpanel.
When I make any of the pane as Floating window and drag it around, once I drag the floating window outside the view area of the screen, I cannot get it back in the view are. I lost the control over the floating window.
Is there a way that I can restrict the floating windows cannot be dragged outside the certain boundry?
Regards...
Nirav
13 Answers, 1 is accepted
Unfortunately there is no feature that lets you restrict the ToolWindow movement. We will log you request and think about adding such feature.
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.
![](/forums/images/avatarimages/default.gif)
I second that. I just 'lost' a window and because I save layout it was difficult to get it back (had to reset layout).
Thanks
Russell Mason
![](/forums/images/avatarimages/bcb53b94-54d7-47e9-8b67-bc1f734ee9f8rw.png)
RadWindow radWindow = new RadWindow();
radWindow.IsRestricted = true;
Also consider the impact this has on scenarios where the Docking layout is persisted. A lost window become lost permanently. Can you a please provide a workaround. I assume the approach taken with RadWindow would apply..
We have added this issue in our Public Issue Tracking System (PITS). You can view it here. You can vote for it, track its status and see when it is going to be implemented.
Greetings,
Miroslav Nedyalkov
the Telerik team
![](/forums/images/avatarimages/default.gif)
Currently there is no way to restrict a ToolWindow to not go outside of the screen. Although you can use the events of the ToolWindow to implement this yourself. I prepared an example that demonstrates the idea - an attached property set trough an implicit style to the ToolWindow control.
Please refer to the attached project.
Miroslav Nedyalkov
the Telerik team
![](/forums/images/avatarimages/default.gif)
If I apply implicit style it doesn't work, Here is my code.
private void ShowNewsView(NotificationMessage msg)
{
UserControl view = new UserControl ();
view.DataContext = msg.Sender;
RadSplitContainer container = GetRadSplitContainer(view, "News", new Size(400, 300));
radDocking1.Items.Add(container);
}
private static RadSplitContainer GetRadSplitContainer(UserControl view, string header, Size size)
{
RadSplitContainer container = new RadSplitContainer() { HorizontalAlignment = HorizontalAlignment.Stretch, VerticalAlignment = VerticalAlignment.Stretch };
RadDocking.SetDockState(container, DockState.FloatingOnly);
RadDocking.SetFloatingSize(container, size);
RadDocking.SetFloatingLocation(container, new Point(250, 50));
RadPaneGroup radPaneGroup = new RadPaneGroup();
RadPane radPane = new RadPane()
{
CanUserPin = false,
CanDockInDocumentHost = true,
Content = view,
Header = header,
};
radPaneGroup.Items.Add(radPane);
container.Items.Add(radPaneGroup);
radPaneGroup.SetValue(RestrictToolWindow.IsRestrictedProperty, true);
return container;
}
Your Help will be appreciated! Thanks
It doesn't matter how you create the panes - the implicit style should apply anyway. The problem must be in something else. Could you please open a support ticket and send us a sample project that reproduces the problem? This would help us investigate what the problem is.
All the best,Miroslav Nedyalkov
the Telerik team
![](/forums/images/avatarimages/default.gif)
Doug
![](/forums/images/avatarimages/loading.gif)
![](/forums/images/avatarimages/default.gif)
![](/forums/images/avatarimages/default.gif)
Can anyone please tell me where I can find an example where they have the solution?
Your help will be much appreciated it.
Regards
There is no example for this feature yet. To enable the feature you need to set the IsRestricted property of the RadDocking control to true and to set the RestrictedAreaMargin to the desired value. RestrictedAreaMaring is of type Thickness and represents the the offset from the Silverlight plugin which restricts the RadWindow control. We are currently working on a help article about this feature.
Hope this helps.
Miroslav Nedyalkov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>