Why don't you just set the VerticalScrollBarVisibility and / or HorizontalScrollBarVisibility your ScrollViewer instance to Visible , and not remove the style-fading behavior?
<ScrollViewer VerticalScrollBarVisibility="Visible"> </ScrollViewer>
EDIT AFTER COMMENTS:
I think I came up with a โsolutionโ. I'm not sure if this is the best way to achieve this, but it seems to give the result you want.
Create your own style for the ScrollViewer , then make one for the most vertical / horizontal ScrollBar (using Blend, as I previously expected). When you have a copy of the default style, edit the following lines:
<VisualState x:Name="NoIndicator"> <Storyboard> <FadeOutThemeAnimation BeginTime="0" TargetName="HorizontalPanningRoot"/> <FadeOutThemeAnimation BeginTime="0" TargetName="VerticalPanningRoot"/> <Fade**In**ThemeAnimation BeginTime="0" TargetName="HorizontalRoot"/> <Fade**In**ThemeAnimation BeginTime="0" TargetName="VerticalRoot"/> </Storyboard> </VisualState>
My guess is that this literally makes the ScrollBar disappear when it doesn't interact, meaning it will always be visible.
Here is the corresponding ScrollViewer XAML (I cannot fit all of this in response). Please note that ScrollViewer is configured to use my custom style ScrollViewerStyle1 , then in this style VerticalScrollBar set to my ScrollBar custom style ScrollBarCustomStyle1 , where NoIndicator VisualState changes. You can do the same with the horizontal scrollbar if you need to.
ScrollViewer Style:
<ScrollContentPresenter x:Name="ScrollContentPresenter" Grid.ColumnSpan="2" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}" Grid.RowSpan="2"/> <ScrollBar x:Name="VerticalScrollBar" Grid.Column="1" HorizontalAlignment="Right" IsTabStop="False" Maximum="{TemplateBinding ScrollableHeight}" Orientation="Vertical" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{TemplateBinding VerticalOffset}" ViewportSize="{TemplateBinding ViewportHeight}" Style="{StaticResource ScrollBarStyle1}"/> <ScrollBar x:Name="HorizontalScrollBar" IsTabStop="False" Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{TemplateBinding HorizontalOffset}" ViewportSize="{TemplateBinding ViewportWidth}"/> <Border x:Name="ScrollBarSeparator" BorderBrush="{ThemeResource ScrollBarTrackBorderThemeBrush}" BorderThickness="0,0,1,1" Background="{ThemeResource ScrollBarTrackBackgroundThemeBrush}" Grid.Column="1" Grid.Row="1"/>
source share