I create simple window use WindowChrome. When i use a CornerRadius, the corners of the window become a pixel ladder. How do i smooth it?
<WindowChrome.WindowChrome>
<WindowChrome CornerRadius="15" GlassFrameThickness="0" CaptionHeight="20"></WindowChrome>
</WindowChrome.WindowChrome>
Unfortunately, you can't smooth it using the
WindowChrome
CornerRadius
property.You can achieve the same effect, but it requires a lot more work.
You have provide a custom style/control template, and add the corner radius on a root
Border
. Then you need to make sure to clip the border's contents to your corner radius.I have an attached behavior that I use to do the clipping.
You get a really nice result, but it's much more work.