Reputation: 1528
I need to add a WPF user control to my existing legacy Winforms application, such that the contents of the user control scale automatically to the size of the main application window.
I see that embedding WPF user controls inside Winforms is possible by using System.Windows.Forms.Integration.ElementHost, but can this container resize the contents of my user control?
Upvotes: 1
Views: 2168
Reputation: 2665
Use ViewBox
that surround your UserControl
... When the parent's Height or Width increases, it will scale automatically according the Height or Width...
In the Case of ViewBox
, It will be proportional to Height and Width...
Upvotes: 2