标签:bind hidden host height parent binding row 显示 ica
AllowsTransparency=true是加载winform:panel,控件不显示:原因窗体的逻辑和渲染冲突
<WindowsFormsHost x:Name="wfh" Grid.Row="1" Grid.Column="1" Margin="10,30,10,30" Background="Transparent"
Width="{Binding ElementName=grid,Path=ActualWidth}"
Height="{Binding ElementName=grid,Path=ActualHeight}"
Visibility="Hidden">
<winform:Panel x:Name="Panel_video" Dock="Fill"/>
</WindowsFormsHost>
解决:添加Popup将控件至于顶层 Popup ,并且AllowsTransparency="False"
<Popup Grid.Row="2" Placement="Bottom" Height="190" Width="400" VerticalOffset="10" HorizontalOffset="-40" IsOpen="True" StaysOpen="True" AllowsTransparency="False">
<WindowsFormsHost x:Name="wfHost"
Visibility="Visible" Background="#e0e0e0" >
<wf:Panel Dock="Fill" BorderStyle="None"/>
</WindowsFormsHost>
</Popup>
WPF 窗体设置AllowsTransparency=true是 panel视频不能显示
标签:bind hidden host height parent binding row 显示 ica
原文地址:https://www.cnblogs.com/qlbky/p/12966807.html