Automatic vertical scroll bar in WPF TextBlock?

后端 未结 10 1956
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-07 07:25

I have a TextBlock in WPF. I write many lines to it, far exceeding its vertical height. I expected a vertical scroll bar to appear automatically when that happe

10条回答
  •  旧时难觅i
    2020-12-07 08:09

    
         
    
    

    I am doing this in another way by putting MaxHeight in ScrollViewer.

    Just Adjust the MaxHeight to show more or fewer lines of text. Easy.

提交回复
热议问题