Articles in this section

How to Disable ScrollViewer When WPF Docking Containing MDI Document?

Overview
This article provides a detailed guide on how to control the ScrollViewer behavior when a WPF DockingManager contains an MDI Document window. By default, the ScrollViewer appears when an item is placed beyond the view. This article explains how to disable it using the IsEnabledScroll property.

Solution

To control the ScrollViewer behavior, use the IsEnabledScroll property of the DocumentContainer. By default, IsEnabledScroll is set to true, meaning the ScrollViewer appears when necessary. Setting this property to false ensures that no scrollbars appear, keeping all content within the visible viewport without scrolling.


Implementation

Use the following approach in C# or VB.NET

C# Code

(dockingManager.DocContainer as DocumentContainer).IsEnabledScroll = false;
VB.NET Code
TryCast(dockingManager.DocContainer, DocumentContainer).IsEnabledScroll = False
Output


Before:

image


After:
image (1)

After applying this solution, the ScrollViewer will no longer appear when DockingManager Containing an MDI Document window.

Conclusion

I hope you enjoyed learning how to disable scrollviewer when WPF Docking Containing MDI Document. 

 For more information, refer to our WPF DockingManager Documentation to explore the additional features
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!


Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied