BartekW
Topic Author
Posts: 53
Joined: 24 Mar 2021, 14:33

Mask on rectangle

21 Apr 2021, 17:04

Hey, I want to make something like mask on rectangle: When button is out of rectangle isnt rendered, is like behind the background. Is here any idea?
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: Mask on rectangle

21 Apr 2021, 17:17

You can set the property ClipToBounds to true in a parent container:
<Grid Width="200" Height="200" ClipToBounds="True">
  <Button Content="Button"/>
</Button>
Is this what you are looking for?
 
BartekW
Topic Author
Posts: 53
Joined: 24 Mar 2021, 14:33

Re: Mask on rectangle

21 Apr 2021, 17:25

You can set the property ClipToBounds to true in a parent container:
<Grid Width="200" Height="200" ClipToBounds="True">
  <Button Content="Button"/>
</Button>
Is this what you are looking for?
Yes, Thanks :)
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: Mask on rectangle

22 Apr 2021, 10:56

Nice, I'm marking this as closed.

Who is online

Users browsing this forum: No registered users and 97 guests