I have a ScrollViewer, it scrolls only vertically and shows a vertical scroll bar if it is only necessary:
<ScrollViewer x:Name="sv" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
I also have a shortcut that I only want to show if the vertical scrollbar shows the ScrollViewer:
<Label Background="DarkBlue" Height="60" Width="70">
<Label.Style>
<Style TargetType="Label">
<Setter Property="Visibility" Value="Visible"/>
<Style.Triggers>
<DataTrigger Binding="{Binding ComputedVerticalScrollBarVisibility.Visibility, ElementName=sv}" Value="Hidden">
<Setter Property="Visibility" Value="Hidden"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Label.Style>
</Label>
This does not work. I was looking for a solution that I usually find pretty quickly, so this is my first post. Any suggestions on how to do this? I would prefer only the xaml solution, but I could make sure that it uses converters and no.
source
share