WPF clipping even when no clipping is desired - how to turn it off?

后端 未结 2 1371
南方客
南方客 2021-01-11 10:17

I need to float out some content out of the ListBox as specified in a DataTemplate for an ListBox.ItemTemplate. I am using Rende

2条回答
  •  抹茶落季
    2021-01-11 10:41

    I stumbled upon a solution to this problem by accident while working around it. If you change the ScrollViewer's HorizontalScrollMode and VerticalScrollMode to "Disabled" within the style template, it will stop clipping in each direction respectively.

    Edit: May not work for WPF. I tested with a UWP app. The fields in question are:

    ScrollViewer.HorizontalScrollMode="Disabled"

    ScrollViewer.VerticalScrollMode="Disabled"

提交回复
热议问题