Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Triggering on a ScrollViewer's scroll bar visibility (WPF)

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>
like image 630
sourcenouveau Avatar asked Oct 16 '09 19:10

sourcenouveau


1 Answers

Trigger on ComputedVerticalScrollBarVisibility.

like image 110
itowlson Avatar answered Sep 17 '22 16:09

itowlson