wieslawsoltes / PanAndZoom

Pan and zoom control for Avalonia.
http://wieslawsoltes.github.io/PanAndZoom/
MIT License
337 stars 44 forks source link

PanAndZoom with WindowsFormsHost #44

Closed MuhammadSulaiman001 closed 3 years ago

MuhammadSulaiman001 commented 4 years ago

I tried to use PanAndZoom with WindowsFormsHost but it did not work:

<panAndZoom:ZoomBorder HorizontalAlignment="Stretch"
                               Focusable="True"
                               ZoomSpeed="1.2"
                               Stretch="None"
                               ClipToBounds="True"
                               Background="SlateBlue"
                               VerticalAlignment="Stretch"> 
            <WindowsFormsHost HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> 
                <forms:MaskedTextBox Text="TOTO" /> 
            </WindowsFormsHost> 
</panAndZoom:ZoomBorder> 

Is there any way to make it work?

wieslawsoltes commented 3 years ago

https://docs.microsoft.com/en-us/dotnet/desktop/wpf/advanced/layout-considerations-for-the-windowsformshost-element?view=netframeworkdesktop-4.8#layout-limitations