我有一个带有ScrollViewer的应用程序。在两个滚动条相遇的地方,有一个令人烦恼的小正方形(请参见下面的图像)。我正在尝试摆脱它。当我使用"Snoop"应用程序时,我可以将其识别为"Rectangle",但我认为它是ScrollViewer的一部分?
我已经搜索了很多信息,但是所有我找到的建议都是通过放置某些东西覆盖它来隐藏它 :s
有人能否指导我正确的方向来解决这个问题?![令人烦恼的小正方形](https://istack.dev59.com/jNtcW.webp)
我已经搜索了很多信息,但是所有我找到的建议都是通过放置某些东西覆盖它来隐藏它 :s
有人能否指导我正确的方向来解决这个问题?
![令人烦恼的小正方形](https://istack.dev59.com/jNtcW.webp)
<ControlTemplate x:Key="HorizontalScrollBar"
TargetType="{x:Type ScrollBar}">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition MaxWidth="18"/>
<ColumnDefinition Width="0.00001*"/>
<ColumnDefinition MaxWidth="18"/>
</Grid.ColumnDefinitions>
<Border
Grid.ColumnSpan="3"
CornerRadius="2"
Background="Transparent" />
<RepeatButton
Grid.Column="0"
Style="{StaticResource ScrollBarLineButton}"
Width="18"
Command="ScrollBar.LineLeftCommand"
Content="M 4 0 L 4 8 L 0 4 Z" />
<Track
Name="PART_Track"
Grid.Column="1"
IsDirectionReversed="False">
<Track.DecreaseRepeatButton>
<RepeatButton
Style="{StaticResource ScrollBarPageButton}"
Command="ScrollBar.PageLeftCommand" />
</Track.DecreaseRepeatButton>
<Track.Thumb>
<Thumb
Style="{StaticResource ScrollBarThumb}"
Margin="0,1,0,1"
Background="{DynamicResource NormalBrush}"
BorderBrush="{DynamicResource NormalBorderBrush}" />
</Track.Thumb>
<Track.IncreaseRepeatButton>
<RepeatButton
Style="{StaticResource ScrollBarPageButton}"
Command="ScrollBar.PageRightCommand" />
</Track.IncreaseRepeatButton>
</Track>
<RepeatButton
Grid.Column="3"
Style="{StaticResource ScrollBarLineButton}"
Width="18"
Command="ScrollBar.LineRightCommand"
Content="M 0 0 L 4 4 L 0 8 Z"/>
</Grid>
</ControlTemplate>