Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

don't display content outside of border wpf

Tags:

c#

wpf

I don't want to display content that is outside the border in my wpf application. Here is an image to illustrate better my point:

enter image description here

in that picture the blue box is the border and note that its child is a listview. I don't want to display the entire listview. I just want to display whatever is inside the blue border.

What control do I have to use in order to achive that? I am looking for some sort of a mask... Is creating a custom user control my only option?

like image 215
Tono Nam Avatar asked Mar 05 '12 20:03

Tono Nam


1 Answers

<Border ClipToBounds="True">
    <ListView .../>
</Border>
like image 195
Kent Boogaart Avatar answered Sep 18 '22 11:09

Kent Boogaart