I have a Form(winform) and it contains Elementhost. During run time, i am hosting my WPF Usercontrols to this elementhost. I have used AutoSize = True for elementhost.
Elementhost resizes itself basedon WPF Usercontrol size. But How to resize my form based my ElementHost’s size.
Thank you,
Here is the answer:
After setting the ElementHost.Child to WPF User control. I will following function:
Original Method posted at: How do I convert a WPF size to physical pixels?
Now I set the client size from new Size.