简体   繁体   English

滚动条样式

[英]Scrollbar Style

How can I remove the small rectangle that appears when a horizontal and vertical scrollbar appear? 如何删除水平和垂直滚动条出现时出现的小矩形?

替代文字

I assume you are using a ScrollViewer. 我假设你使用的是ScrollViewer。 The default template of a ScrollViewer is a Grid containing two rows and two columns. ScrollViewer的默认模板是包含两行和两列的Grid。 The upper left cell contains the ScrollViewer content, upper right the vertical ScrollBar, lower left the horizontal ScrollBar, and a Rectangle on the lower right cell. 左上角的单元格包含ScrollViewer内容,右上角是垂直ScrollBar,左下角是水平ScrollBar,右下角的单元格是Rectangle。 Please check this article: http://www.eggheadcafe.com/tutorials/aspnet/f51ddf8c-5227-4f1b-a5df-ec3d1b3439ca/styling-the-wpf-scrollviewer.aspx . 请查看这篇文章: http//www.eggheadcafe.com/tutorials/aspnet/f51ddf8c-5227-4f1b-a5df-ec3d1b3439ca/styling-the-wpf-scrollviewer.aspx You can see the default template there. 您可以在那里看到默认模板。 You could remove the rectangle and then set either the ColumnSpan of the horizontal ScrollBar or RowSpan of the vertical ScrollBar to cover the lower right cell. 您可以删除矩形,然后设置水平ScrollBar的ColumnSpan或垂直ScrollBar的RowSpan以覆盖右下方的单元格。 Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM