I'm currently creating a metro styled app. Because of this I need to extend my client area out of my window to draw the shadow. The problem now is that I have a button set to Margin="0,0,15,15" and of course it draws itself also in this shadow area. How can I hide this? In CSS I would just apply overflow:hidden to the "Content" or the UserControl.
The basic WPF structure is like this:
<Grid x:Name="LayoutRoot" SnapsToDevicePixels="True" Margin="15" Background="White">
<Grid.Effect>
<DropShadowEffect ShadowDepth="0" BlurRadius="15" Direction="470"/>
</Grid.Effect>
<Grid x:Name="Content">
<UserControl></UserControl> // This is where the arrow button is with Margin="0,0,15,15"
</Grid>
</Grid>
Normally you can use some container and set its ClipToBounds
to true
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With