I would like a textblock that has vertical scrolling. I have the following XAML
<ScrollViewer HorizontalAlignment="Left" Height="90" Margin="10,416,0,0" VerticalAlignment="Top" Width="463" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" CanContentScroll="True" >
<TextBlock Name="txtConfigPath" Text="" >
</TextBlock>
</ScrollViewer>
This produces a textblock that only scrolls horizontally. I’ve tried everything I can think of but this control only wants to scroll horizontally.
You have several options here. You can set
TextWrapping=Wrapon theTextBlockandDisablethe HorizontalScrolling on theScrollViewer, or you can set theTextWrappingon the TextBlock and either set a fixed width to yourTextBlockor you can Bind it’sMaxWidthto theActualWidthof theScrollViewerlikeTextBlock MaxWidth="{Binding RelativeSource={RelativeSource AncestorType=ScrollViewer}, Path=ActualWidth}"Hope this helps, cheers!