C# WPF - ScrollViewer + TextBlock troubles

后端 未结 3 1244
迷失自我
迷失自我 2020-12-31 02:17

I have a TextBlock within a ScrollViewer that aligns with stretch to its window. I need the TextBlock to behave as the following:

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-31 02:49

    Without more detail, the best I can do is provide the standard way of doing this. Basically, host your element (which has a minimum size) in a scroll viewer; when the scrollviewer is resized small enough such that the element cannot wholly fit inside it, it will automatically display scroll bars. Example:

    
        

提交回复
热议问题