I have a menu and taskbar on a page with a RadDocking in the center. I need to restrict the size and positioning of the ToolWindows created by the RadDocking. So far, I am able to do that using the following code (in a custom ToolWindow):
// Restrict the window by its parent RadDocking.
( IsBoundByParent )
RadDocking parentDocking =
GeneralTransform transform = parentDocking.TransformToVisual(
restrictionLocation = transform.Transform(
Point( 0, 0 ) );
Size( parentDocking.ActualWidth, parentDocking.ActualHeight );
// Restrict the window by the application.
Point( 0, 0 );
// Restrict the window size when maximized.
MaxWidth = restrictionSize.Width;
MaxHeight = restrictionSize.Height;
// Restrict the window location and size when not maximized.
helper.UpdatePropertiesDependantOnWindow( restrictionLocation, restrictionSize, IsRestricted,
Thickness( 0 ) );
The only problem I am still having is the problem mentioned by Bg; when setting the MaxHeight, the maximized window is not responding to double clicks that would normally restore the window to windowed mode. This behavior appears to be limited to setting the MaxHeight property.
I hope you are not catching the double click in an area at the top of the screen instead of on the control itself...
I have seen the issue in PITS, but as it does not appear to be fixed any time soon, would anyone be able to provide some additional information on why this problem may occur and how I can work around it (for the time being)? Perhaps a short description on how the mouse events are handled in the WindowBase?
PS: If I drag and then rapidly click a ToolWindow, it is maximized. When dragging, the double click feature should be disabled.