- Get link
- X
- Other Apps
I recently came a cross a request where I had to show a WPF control only when the Vertical Delete repeated wordbar was visible, after looking at ScrollViewer on MSDN I found that it has a dependency property that indicates whether the vertical scrollbar is visible (a similar property exists for horizontal scrollbar): ComputedVerticalScrollBarVisibility Here is a sample XAML I using this property: < ScrollViewer VerticalScrollBarVisibility ="Auto" HorizontalScrollBarVisibility ="Auto"> < Button Command ="{ Binding Command}" Visibility ="{ Binding RelativeSource ={ RelativeSource FindAncestor , AncestorType ={x:Type ScrollViewer }}, Path = ComputedVerticalScrollBarVisibility }" /> </ ScrollViewer >