MaterialDesignInXAML / MaterialDesignInXamlToolkit

Google's Material Design in XAML & WPF, for C# & VB.Net.
http://materialdesigninxaml.net
MIT License
15.18k stars 3.43k forks source link

Buttons are blurry, really blurry when compared to a filterchip checkbox #2259

Closed honguyenminh closed 2 years ago

honguyenminh commented 3 years ago

This is quite unreasonable since the filter chip checkbox is sharp and clean, while the buttons are blurry at the edge and also have redundant residue at corners, shown as curved lines around the button

And for the default button, there's a hole or a dot at the corner

You dont need any special code for this, example can be found right in the demo app. Or if you want a closer look, boot up any WPF project that have MDIX configured, drag a button into the designer, then zoom in and see it for yourself. Any button can reproduce this. But the checkboxes are ok.

Screenshots of the buttons:

Filter chip heckbox vs button Checkbox vs button

DemoApp DemoApp

The gap at the corner of default button The gap at the corner of default button

With corner radius = 20 With corner radius = 20

Erapchu commented 3 years ago

Hello! Buttons are cached with DependencyProperty CacheModeProperty in ShadowAssist. To avoid this you need to set CacheMode property to null (shadow assist). image

honguyenminh commented 3 years ago

If that's how to fix the blurryness, why the CacheMode isn't set to null by default?

And look closely, you can still see the border in a standard filled button. The border is the exact same color, so why can't we just hide it by default?

Erapchu commented 3 years ago

To remove border please try to set border thickness property to zero. What about cache mode, I faced an issue with it:

https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/issues/2260

Erapchu commented 3 years ago

Cache mode should improve performance. Without it buttons and other controls may invoke lags. You can see blurred buttons and other controls - this is like a bitmap rendered image.