WPF Adorner Clipping

后端 未结 3 2078
一整个雨季
一整个雨季 2021-02-20 15:56

I have an ItemsControl in a ScrollViewer. The items in the ItemsControl are expanded to a DataTemplate which basically consis

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-20 16:18

    I've encountered the same problem when subclassing the WPFToolkit DataGrid to draw an adorner around the current cell.

    The content of the ScrollViewer is rendered by a ScrollContentPresenter instance. ScrollContentPresenter has its own adorner layer, which is accessible through the ScrollContentPresenter.AdornerLayer property.

    I found that my adorner correctly clips if I add it to that layer.

提交回复
热议问题