问题描述
图中圈里的白色矩形如何改变颜色的啊?帮帮忙啊
解决方案
解决方案二:
上边那个方向箭头是什么颜色?
解决方案三:
自己修改成你想要的。<!--滚动条样式--><Stylex:Key="ScrollBarThumb"TargetType="{x:TypeThumb}"><SetterProperty="SnapsToDevicePixels"Value="True"/><SetterProperty="OverridesDefaultStyle"Value="true"/><SetterProperty="IsTabStop"Value="false"/><SetterProperty="Width"Value="8"/><SetterProperty="Focusable"Value="false"/><SetterProperty="Template"><Setter.Value><ControlTemplateTargetType="{x:TypeThumb}"><Borderx:Name="border"Background="#D6D4D4"BorderBrush="{TemplateBindingBorderBrush}"BorderThickness="0"/><ControlTemplate.Triggers><TriggerProperty="IsMouseOver"Value="True"><SetterProperty="Background"TargetName="border"Value="#6A6A6A"></Setter></Trigger></ControlTemplate.Triggers></ControlTemplate></Setter.Value></Setter></Style><ControlTemplatex:Key="VerticalScrollBar"TargetType="{x:TypeScrollBar}"><Grid><Grid.RowDefinitions><RowDefinitionMaxHeight="18"/><RowDefinitionHeight="*"/><RowDefinitionMaxHeight="18"/></Grid.RowDefinitions><BorderGrid.RowSpan="3"CornerRadius="2"Background="Transparent"BorderThickness="0"BorderBrush="#D6D4D4"/><RepeatButtonGrid.Row="0"Style="{StaticResourceScrollBarLineButton}"Height="18"Command="ScrollBar.LineUpCommand"Content="M04L84L40Z"/><TrackName="PART_Track"Grid.Row="1"IsDirectionReversed="true"><Track.DecreaseRepeatButton><RepeatButtonStyle="{StaticResourceScrollBarPageButton}"/></Track.DecreaseRepeatButton><Track.Thumb><ThumbStyle="{StaticResourceScrollBarThumb}"Margin="1,0,1,0"Background="{StaticResourceHorizontalNormalBrush}"BorderBrush="{StaticResourceHorizontalNormalBorderBrush}"/></Track.Thumb><Track.IncreaseRepeatButton><RepeatButtonStyle="{StaticResourceScrollBarPageButton}"Command="ScrollBar.PageDownCommand"/></Track.IncreaseRepeatButton></Track><RepeatButtonGrid.Row="3"Style="{StaticResourceScrollBarLineButton}"Height="18"Command="ScrollBar.PageDownCommand"Content="M00L44L80Z"/></Grid></ControlTemplate><Stylex:Key="HScrollBarThumb"TargetType="{x:TypeThumb}"><SetterProperty="SnapsToDevicePixels"Value="True"/><SetterProperty="OverridesDefaultStyle"Value="true"/><SetterProperty="IsTabStop"Value="false"/><SetterProperty="Height"Value="9"/><SetterProperty="HorizontalAlignment"Value="Stretch"/><SetterProperty="Focusable"Value="false"/><SetterProperty="Template"><Setter.Value><ControlTemplateTargetType="{x:TypeThumb}"><Borderx:Name="border"CornerRadius="0"Background="#D6D4D4"BorderBrush="{TemplateBindingBorderBrush}"BorderThickness="0"/><ControlTemplate.Triggers><TriggerProperty="IsMouseOver"Value="True"><SetterProperty="Background"TargetName="border"Value="#6A6A6A"></Setter></Trigger></ControlTemplate.Triggers></ControlTemplate></Setter.Value></Setter></Style><ControlTemplatex:Key="HorizontalScrollBar"TargetType="{x:TypeScrollBar}"><Grid><Grid.ColumnDefinitions><ColumnDefinitionMaxWidth="18"/><ColumnDefinitionWidth="*"/><ColumnDefinitionMaxWidth="18"/></Grid.ColumnDefinitions><BorderGrid.ColumnSpan="3"CornerRadius="2"Background="Transparent"BorderThickness="0"BorderBrush="#D6D4D4"/><RepeatButtonGrid.Column="0"Style="{StaticResourceScrollBarLineButton}"Width="18"Command="ScrollBar.LineLeftCommand"Content="M40L48L04Z"/><TrackName="PART_Track"Grid.Column="1"IsDirectionReversed="False"><Track.DecreaseRepeatButton><RepeatButtonStyle="{StaticResourceScrollBarPageButton}"/></Track.DecreaseRepeatButton><Track.Thumb><ThumbStyle="{StaticResourceHScrollBarThumb}"Margin="0,1,0,1"Background="{StaticResourceNormalBrush}"BorderBrush="{StaticResourceNormalBorderBrush}"/></Track.Thumb><Track.IncreaseRepeatButton><RepeatButtonStyle="{StaticResourceScrollBarPageButton}"/></Track.IncreaseRepeatButton></Track><RepeatButtonGrid.Column="2"Style="{StaticResourceScrollBarLineButton}"Width="18"Command="ScrollBar.PageRightCommand"Content="M00L44L08Z"/></Grid></ControlTemplate><!--滚动条整体样式--><Stylex:Key="{x:TypeScrollBar}"TargetType="{x:TypeScrollBar}"><SetterProperty="SnapsToDevicePixels"Value="True"/><SetterProperty="OverridesDefaultStyle"Value="true"/><Style.Triggers><TriggerProperty="Orientation"Value="Horizontal"><SetterProperty="Width"Value="Auto"/><SetterProperty="Height"Value="10"/><SetterProperty="Template"Value="{StaticResourceHorizontalScrollBar}"/></Trigger><TriggerProperty="Orientation"Value="Vertical"><SetterProperty="Width"Value="10"/><SetterProperty="Height"Value="Auto"/><SetterProperty="Template"Value="{StaticResourceVerticalScrollBar}"/></Trigger></Style.Triggers></Style></Style.Resources></Style>
解决方案四:
跟TreeView没有关系。。跟滚动条样式有关
解决方案五:
滚动条上下两个按钮都隐藏了。系统自带的滚动条也是有这样的,只是不知道怎么修改圈中的矩形块的颜色?
解决方案六:
我也遇见相同问题了我觉得不是滚动条问题,好像是树的问题