【问题标题】:Placing a shadow over a WindowsFormsHost?在 WindowsFormsHost 上放置阴影?
【发布时间】:2020-05-04 16:18:22
【问题描述】:

我有一个 WPF 网格停靠在 WindowsFormsHost 中托管的 RichTextBox 旁边。网格有一个覆盖 WindowsFormsHost 的阴影,但是它没有显示在 WindowsFormsHost 上。

这是托管 Windows 窗体控件的一般问题还是有解决方法?

提前致谢。

<WindowsFormsHost x:Name="WinFormsHost" Focusable="True" Background="White"/>
<Grid Background="White">
    <Grid.Effect>
        <DropShadowEffect Direction="90" Color="#FFC3C3C3" BlurRadius="15" Opacity="0.2"/>
    </Grid.Effect>
</Grid>

【问题讨论】:

    标签: wpf winforms xaml windowsformshost


    【解决方案1】:

    WindowsFormsHost 以最高 z-index 运行,不能被覆盖。这是一个古老的问题,称为“空域问题”。不幸的是,没有解决方法。

    【讨论】:

      猜你喜欢
      • 2012-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多