如何去除DocumentViewer的阴影?

发布于 2024-12-31 23:11:53 字数 222 浏览 2 评论 0原文

如何从 DocumentViewer 控件中删除投影?
如果我使用 docViewer.ShowPageBorders = false ,文档周围的正常边框也会消失。当我设置 BorderBrush 时,边框围绕控件而不是文档。
这是我的意思的屏幕截图: 在此处输入图像描述

知道如何执行此操作吗?

How can I remove the drop-shadow from the DocumentViewer control?
If I use docViewer.ShowPageBorders = false the normal border around the document is gone too. When I set a BorderBrush the border goes around the control and not the document.
Here is a screenshot of what I mean:
enter image description here

Any idea how I can do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

安静 2025-01-07 23:11:53

我通过创建自己的样式来实现它,该样式覆盖内置样式(以及 ShowPageBorders="False"):

<Style TargetType="{x:Type DocumentPageView}">
    <Setter Property="OverridesDefaultStyle" Value="True" />
    <!-- custom styles here -->
</Style>

通过为您的 DocumentViewer< 使用自定义 Template /code> 您可以进一步改变它的外观。

I achieved it by creating my own style which overrides the built in style (along with ShowPageBorders="False"):

<Style TargetType="{x:Type DocumentPageView}">
    <Setter Property="OverridesDefaultStyle" Value="True" />
    <!-- custom styles here -->
</Style>

By using a custom Template for your DocumentmentViewer you can change how it all looks even more.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文