0

i have this code in one of the pages

 <FlipView ScrollViewer.VerticalScrollBarVisibility="Visible" x:Name="Flip" Grid.Row="1" AutomationProperties.AutomationId="ItemsFlipView" AutomationProperties.Name="Item Details" TabIndex="1" DataContext="{Binding RssModel}" d:DataContext="{d:DesignData Source=/Assets/Data/RssDataSource.json, Type=vm:RssViewModel, IsDesignTimeCreatable=true}" ItemsSource="{Binding Items}" ItemTemplate="{StaticResource Rss1DetailDetail}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" ItemContainerStyle="{StaticResource FlipItemStyle}"> </FlipView> 

i cant see the scrollbar because the background is white and i can see it when i set background to another color. how i can change scrollbar color to app foreground color (globally). i know it should be on styles but i want the exact code for it.

1 Answer 1

1

The brushes you find here https://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj710190.aspx can be overridden if you put a new one into your app resources with the same key. For example the key for the scrollbar background is probably the ScrollBarTrackBackgroundThemeBrush, so for a red background just add the line <SolidColorBrush x:Key="ScrollBarTrackBackgroundThemeBrush" Color="Red" /> to your resources.

Edit:

Correct key is: <SolidColorBrush x:Key="ScrollBarPanningBackgroundThemeBrush" Color="#FFCDCDCD"/>

Sign up to request clarification or add additional context in comments.

1 Comment

thanks. this is the exact line to change scroll bar color. <SolidColorBrush x:Key="ScrollBarPanningBackgroundThemeBrush" Color="#FFCDCDCD"/> please edit your reply to mark as answer

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.