WPF ScrollViewer 在 ScrollBar 可见时显示边框
我想为我的 ScrollViewer 添加边框。仅当 ScrollViewer 的 ScrollBar 可见时才应显示边框(VerticalScrollBarVisibility 设置为“Auto”)
谢谢!
I want to add a border to my ScrollViewer. The border should only be shown when the ScrollBar of the ScrollViewer is Visible (VerticalScrollBarVisibility set to "Auto")
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用样式和触发器来执行此操作,如下所示:
You can do this using styles and triggers, like this:
使用
Binding
和Converter
。还有你的 xaml:
不要忘记将你的转换器添加到资源中!
GL&HF
Use
Binding
andConverter
.and than your xaml:
don't forget to add your converter to resources!
GL&HF