Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am trying to host a Panel in a WindowsformsHost control as follows:

XML
<DockPanel LastChildFill="true" Grid.Column="1" Grid.ColumnSpan="2">
   <WindowsFormsHost Name="FormsHost" Background="Aqua" Height="{Binding ElementName=RootWindow, Path=ActualHeight}" Width="{Binding ElementName=RootWindow, Path=ActualWidth}">
        <wf:Panel Dock="Fill" x:Name="basePanel" AutoSize="True" />
    </WindowsFormsHost>
</DockPanel>




for some reason the panel doesn't resize when the application does. Has anyone got any ideas?
Posted

1 solution

Try binding the Height/Width to your dockpanel's height/width instead of the rootwindow.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900