开发者

Scrollbar Style

开发者 https://www.devze.com 2023-01-22 21:26 出处:网络
How can I remove the small rectang开发者_开发问答le that appears when a horizontal and vertical scrollbar appear?

How can I remove the small rectang开发者_开发问答le that appears when a horizontal and vertical scrollbar appear?

Scrollbar Style


I assume you are using a ScrollViewer. The default template of a ScrollViewer is a Grid containing two rows and two columns. 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. Please check this article: 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. Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消