Hi,
I'm trying to use RadWindow.IsRestricted and RadWindow.RestrictedAreaMargin
properties to narrow the available space for dragging and dropping the window.
I don't wish window lower and right hand edge to exit IE boundaries when dragging the window.
For some values for restricted area I'm getting good results but not good enough.
I wish to have RadWindow with size of 600 x 800 pxls and I want it to be draggable across the entire
control that is stretched vertically and horizontally to fully fit the maximized IE window.
For thickness object set to (left - 10, top-10, right-600, bottom-600) I can drag the window in very small area.
When this area becomes larger, e.g. (10, 10, 800, 800), the window is very strange and when I try to
maximize it to see it filling entire restricted area I get the exception pasted bellow.
I created small project for reproducing this issue, hope it will help you to solve this, it is attached to this post.
Since you have supported types for attached files, i changed my zip archive file extension to .jpg,
so just rename it to the RadWindowMaximized.zip to get the archive. I hope the code is better than just a screenshot.
Thank you in advance.
"Value does not fall within the expected range."
at System.Windows.Rect.set_Height(Double value)\r\n at Telerik.Windows.Controls.RadWindowStateManager.UpdateMaximize()\r\n at Telerik.Windows.Controls.RadWindowStateManager.get_SizeAndPosition()\r\n at Telerik.Windows.Controls.RadWindow.UpdateWindowState()\r\n at Telerik.Windows.Controls.RadWindow.OnWindowStateChanged()\r\n at Telerik.Windows.Controls.RadWindow.OnWindowStateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object newValue, Object oldValue)\r\n at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isSetByStyle, Boolean isSetByBuiltInStyle, PropertyInvalidationReason reason)\r\n at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value)\r\n at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)\r\n at Telerik.Windows.Controls.RadWindow.set_WindowState(WindowState value)\r\n at Telerik.Windows.Controls.RadWindow.OnTitleDoubleClick()\r\n at Telerik.Windows.Controls.RadWindow.OnThumbDragStarted(Object sender, DragStartedEventArgs e)\r\n at System.Windows.Controls.Primitives.Thumb.OnMouseLeftButtonDown(MouseButtonEventArgs e)\r\n at System.Windows.Controls.Control.OnMouseLeftButtonDown(Control ctrl, EventArgs e)\r\n at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
I'm trying to use RadWindow.IsRestricted and RadWindow.RestrictedAreaMargin
properties to narrow the available space for dragging and dropping the window.
I don't wish window lower and right hand edge to exit IE boundaries when dragging the window.
For some values for restricted area I'm getting good results but not good enough.
I wish to have RadWindow with size of 600 x 800 pxls and I want it to be draggable across the entire
control that is stretched vertically and horizontally to fully fit the maximized IE window.
For thickness object set to (left - 10, top-10, right-600, bottom-600) I can drag the window in very small area.
When this area becomes larger, e.g. (10, 10, 800, 800), the window is very strange and when I try to
maximize it to see it filling entire restricted area I get the exception pasted bellow.
I created small project for reproducing this issue, hope it will help you to solve this, it is attached to this post.
Since you have supported types for attached files, i changed my zip archive file extension to .jpg,
so just rename it to the RadWindowMaximized.zip to get the archive. I hope the code is better than just a screenshot.
Thank you in advance.
"Value does not fall within the expected range."
at System.Windows.Rect.set_Height(Double value)\r\n at Telerik.Windows.Controls.RadWindowStateManager.UpdateMaximize()\r\n at Telerik.Windows.Controls.RadWindowStateManager.get_SizeAndPosition()\r\n at Telerik.Windows.Controls.RadWindow.UpdateWindowState()\r\n at Telerik.Windows.Controls.RadWindow.OnWindowStateChanged()\r\n at Telerik.Windows.Controls.RadWindow.OnWindowStateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object newValue, Object oldValue)\r\n at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isSetByStyle, Boolean isSetByBuiltInStyle, PropertyInvalidationReason reason)\r\n at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value)\r\n at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)\r\n at Telerik.Windows.Controls.RadWindow.set_WindowState(WindowState value)\r\n at Telerik.Windows.Controls.RadWindow.OnTitleDoubleClick()\r\n at Telerik.Windows.Controls.RadWindow.OnThumbDragStarted(Object sender, DragStartedEventArgs e)\r\n at System.Windows.Controls.Primitives.Thumb.OnMouseLeftButtonDown(MouseButtonEventArgs e)\r\n at System.Windows.Controls.Control.OnMouseLeftButtonDown(Control ctrl, EventArgs e)\r\n at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)