[RESOLVED✅] StackPanel and CornerRadius of Border that contained it

As seen in the screenshot, the StackPanel somehow got across the border element, maybe because some background="transparent" but is there any workaround for this. If I wrap the StackPanel in a border like this and do the same, then won't the entire StackPanel (bottom, top) be cornered and become a Pill shaped, which isn't what we want. sample code: https://pastebin.com/rEeHTtPz
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
No description
6 Replies
ero
ero2w ago
I'm not sure what I'm supposed to be looking at. What border? What stackpanel? Everything looks in order and nothing is "getting across" anything
V A R I A N T
V A R I A N TOP2w ago
see the image, the top bar is the stack panel, and towards the bottom are two other grids, all these is inside a Border and its Corner radius is set. so its rounded but the stackpanel didn't get rounded
V A R I A N T
V A R I A N TOP2w ago
this is how the rest of the stuff is behind the StackPanel if we move it away
No description
V A R I A N T
V A R I A N TOP2w ago
so I thought the Top corners of it should be rounded right. btw I'm new to this
cned
cned2w ago
You probably need to add a border and rounded corners to the top bar too. I don't think the "CornerRadius" modifies the clip region. (If it did, the drop shadows would also likely get cliped away by the outer box). You can specify all 4 corners, so you can only round the top corners of the blue area.
V A R I A N T
V A R I A N TOP2w ago
okay thanks, my bad I didn't think we could specify the corners.

Did you find this page helpful?