WPF: Get “wrapped” text out of a textbox

后端 未结 4 694
执笔经年
执笔经年 2021-01-18 18:46

Is there a way in WPF to get the text formatted as it display on the textbox when TextWrapping=\"Wrap\"?



        
4条回答
  •  不要未来只要你来
    2021-01-18 19:16

    See the answer by Ian Griffiths to this question: Get Displayed Text from TextBlock

    It gets the displayed text (as it is presented on the screen) from a TextBlock but I think you should be able to use it for a TextBox as well

提交回复
热议问题