Do not show content outside wpf border

I do not want to display content that is outside the wpf application border. Here is an image to better illustrate my point:

enter image description here

in this image, the blue square is the border and note that its child is a list. I do not want to display the entire list. I just want to display everything that is inside the blue border.

What control should I use to achieve this? I'm looking for some kind of mask ... Does the user control only create my option?

+6
source share
2 answers
<Border ClipToBounds="True"> <ListView .../> </Border> 
+11
source

Just set ClipToBounds to true on the border and it should be disabled.

+5
source

Source: https://habr.com/ru/post/910025/


All Articles