Winforms DotNet ListBox items to word wrap if content string width is bigger than ListBox width?

后端 未结 4 1043
死守一世寂寞
死守一世寂寞 2020-12-03 11:37

Ehm, umm, this means some lines should be two-lined in size. My boss think this is more simple solution, than limit displayed text to fit width and don\'t like horizontal sc

4条回答
  •  感动是毒
    2020-12-03 11:56

    Helpful link

    Check out this answer. It overrides the template of the listbox with a textblock which wraps the text. Hope it's useful. To solve your problem I think you shold add : ScrollViewer.HorizontalScrollBarVisibility="Disabled" . Found it here

提交回复
热议问题