您好我正在尝试在WindowsformsHost控件中托管Panel,如下所示:
<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>
由于某种原因,当应用程序执行时,面板不会调整大小。有没有人有任何想法?