I wish to implement a scroll bar in a tab here is the following tab code i have:
<TabControl x:Name="tabs"
Grid.Column="2"
Margin="5 0">
<TabControl.LayoutTransform>
<ScaleTransform ScaleX="{Binding ElementName=zoomSlider,
Path=Value}"
ScaleY="{Binding ElementName=zoomSlider,
Path=Value}" />
</TabControl.LayoutTransform>
</TabControl>
However i know it is a scalable tab using a slider, but all i want is the scroll bar to display as another option instead of scaling the page all the time just for usability.
here is the code i have with the scroll bar implemented but it doesn't display.
<TabControl x:Name="tabs"
Grid.Column="2"
Margin="5 0"
ScrollViewer.VerticalScrollBarVisibility="Auto">
<TabControl.LayoutTransform>
<ScaleTransform ScaleX="{Binding ElementName=zoomSlider,
Path=Value}"
ScaleY="{Binding ElementName=zoomSlider,
Path=Value}" />
</TabControl.LayoutTransform>
</TabControl>
im pretty sure by adding the code: ScrollViewer.VerticalScrollBarVisibility="Auto" it should work?
Any help would be greatly appreciated.
You will have to wrap the TabControl
in a ScrollViewer
as TabControl
does not have a ScrollViewer
by default
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<TabControl x:Name="tabs" Grid.Column="2" Margin="5 0" >
<TabControl.LayoutTransform>
<ScaleTransform ScaleX="{Binding ElementName=zoomSlider, Path=Value}"
ScaleY="{Binding ElementName=zoomSlider, Path=Value}" />
</TabControl.LayoutTransform>
</TabControl>
</ScrollViewer>
Result:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With