views:

367

answers:

1

Is it possible to create a Trigger that is triggered based on a ScrollViewer's scroll bar visibility? I have a ScrollViewer with its VerticalScrollBarVisibility set to Auto and I want to change some of the ScrollViewer's properties only when the scroll bar is actually visible.

Something like this:

<ScrollViewer VerticalScrollBarVisibility="Auto">
    <ScrollViewer.Triggers>
        <Trigger Property="IsScrollBarVisible" Value="True">
            <!-- Setters -->
        </Trigger>
    </ScrollViewer.Triggers>
</ScrollViewer>
+2  A: 

Trigger on ComputedVerticalScrollBarVisibility.

itowlson
http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollviewer.computedverticalscrollbarvisibility.aspx
emddudley