There is no property for this. However, it is easy to do it with custom code and put restrictions to the window. You can hook on the LocationChanged
event of your window and then add this code:
| private void window1_LocationChanged(object sender, RoutedEventArgs e)
| Size rootVisualSize = Application.Current.RootVisual.RenderSize;
| window1.Left = Math.Max(0, Math.Min(window1.Left, rootVisualSize.Width - window1.Width));
| window1.Top = Math.Max(0, Math.Min(window1.Top, rootVisualSize.Height - window1.Height));
This will restrict moving of the window outside the RootVisual
You can use other coordinates according to your purpose and liking. The window1.Left/Top
property indicates the coordinates of the top-left corner of the window. I have attached a sample project.
I hope this helps.
the Telerik team