Scrollbar Style issue

mion shion 241 Reputation points
2024-02-06T13:08:48.11+00:00

Good Afternoon all i have been coding program and have got most of the elements in the scrollbar down but cant seem to get the outline on the thumb of the scrollbar to change thought it would be border thickness Screenshot 2024-02-06 125957

its the white outlining i am having issues with. the style i currently have.

<!-- Style for vertical ScrollBar -->
<Style TargetType="{x:Type ScrollBar}">
    <Setter Property="Background" Value="#FF333333" />
    <Style.Triggers>
        <Trigger Property="Orientation" Value="Vertical">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ScrollBar}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <!-- Up arrow button -->
                            <RepeatButton x:Name="LineUpButton" Grid.Row="0" Height="18" Command="ScrollBar.LineUpCommand"
                            Background="#FF1E1E1E" Foreground="#FFCCCCCC" Content="▲">
                                <RepeatButton.Style>
                                    <Style TargetType="{x:Type RepeatButton}">
                                        <Setter Property="Background" Value="#FF1E1E1E" />
                                        <Setter Property="Foreground" Value="#FFCCCCCC" />
                                        <Style.Triggers>
                                            <Trigger Property="IsMouseOver" Value="True">
                                                <Setter Property="Background" Value="#515151" />
                                                <Setter Property="Foreground" Value="#FFFFFF" />
                                            </Trigger>
                                            <Trigger Property="IsPressed" Value="True">
                                                <Setter Property="Background" Value="#2d2d2d" />
                                                <Setter Property="Foreground" Value="#FFFFFF" />
                                            </Trigger>
                                        </Style.Triggers>
                                    </Style>
                                </RepeatButton.Style>
                            </RepeatButton>
                            <Track Name="PART_Track" Grid.Row="1" IsDirectionReversed="true">
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton Command="ScrollBar.PageUpCommand" Background="#FF333333"
                                    BorderBrush="#FF333333" BorderThickness="0" />
                                </Track.DecreaseRepeatButton>
                                <Track.Thumb>
                                    <Thumb Background="#FF2E2E2E" BorderBrush="#FF2E2E2E" BorderThickness="0"
                                    />
                                </Track.Thumb>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton Command="ScrollBar.PageDownCommand" Background="#FF333333"
                                    BorderBrush="#FF333333" BorderThickness="0" />
                                </Track.IncreaseRepeatButton>
                            </Track>
                            <!-- Down arrow button -->
                            <RepeatButton x:Name="LineDownButton" Grid.Row="2" Height="18" Command="ScrollBar.LineDownCommand"
                            Background="#FF1E1E1E" Foreground="#FFCCCCCC" Content="▼">
                                <RepeatButton.Style>
                                    <Style TargetType="{x:Type RepeatButton}">
                                        <Setter Property="Background" Value="#FF1E1E1E" />
                                        <Setter Property="Foreground" Value="#FFCCCCCC" />
                                        <Style.Triggers>
                                            <Trigger Property="IsMouseOver" Value="True">
                                                <Setter Property="Background" Value="#515151" />
                                                <Setter Property="Foreground" Value="#FFFFFF" />
                                            </Trigger>
                                            <Trigger Property="IsPressed" Value="True">
                                                <Setter Property="Background" Value="#2d2d2d" />
                                                <Setter Property="Foreground" Value="#FFFFFF" />
                                            </Trigger>
                                        </Style.Triggers>
                                    </Style>
                                </RepeatButton.Style>
                            </RepeatButton>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Trigger>
    </Style.Triggers>
</Style>

any help would be much appricated kind regards elfenliedtopfan5

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,648 questions
{count} votes