C
C#2mo ago
Elio

Clip content in a Border

Hi, I'm trying to clip the content of my grid to a border. I do not understand why my border is getting back to a rectangle (bottom right/left) when i scroll in my datagrid . here is the code how i tried in order to clip my grid in the border using opacity mask:
<Grid
Height="558"
MaxWidth="320"
Margin="15,10,5,0"
DockPanel.Dock="Left">
<Grid.Effect>
<DropShadowEffect
BlurRadius="15"
Direction="-90"
Opacity=".2"
RenderingBias="Quality"
ShadowDepth="1" />
</Grid.Effect>
<Border
x:Name="mask"
Background="{StaticResource GrayPrimaryColor}"
ClipToBounds="True"
CornerRadius="20" />
<Grid ClipToBounds="True">
<Grid.OpacityMask>
<VisualBrush Visual="{Binding ElementName=mask}" />
</Grid.OpacityMask>
<listing:ListingStepView DataContext="{Binding ListingStepViewModel}" SelectionMode="Extended" />
</Grid>
</Grid>
<Grid
Height="558"
MaxWidth="320"
Margin="15,10,5,0"
DockPanel.Dock="Left">
<Grid.Effect>
<DropShadowEffect
BlurRadius="15"
Direction="-90"
Opacity=".2"
RenderingBias="Quality"
ShadowDepth="1" />
</Grid.Effect>
<Border
x:Name="mask"
Background="{StaticResource GrayPrimaryColor}"
ClipToBounds="True"
CornerRadius="20" />
<Grid ClipToBounds="True">
<Grid.OpacityMask>
<VisualBrush Visual="{Binding ElementName=mask}" />
</Grid.OpacityMask>
<listing:ListingStepView DataContext="{Binding ListingStepViewModel}" SelectionMode="Extended" />
</Grid>
</Grid>
It seems to happen when I'm scrolling fast down or up.
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server