spiegelp / MaterialDesignExtensions

Material Design Extensions is based on Material Design in XAML Toolkit to provide additional controls and features for WPF apps
https://spiegelp.github.io/MaterialDesignExtensions/
MIT License
762 stars 122 forks source link

MaterialWindow delay to udpate title bar background color #145

Open stojy opened 3 years ago

stojy commented 3 years ago

There seems to be a noticable delay when a MaterialWindow is rendered, whereby the chrome grey background color is shown before it is overwritten with the BorderBackgroundBrush.

On my reasonaly spec'd 11th gen CPU, it takes around 200-300ms. Which is quite jarring visually.

As expected, the delay is longer as the complexity of the window's children increases. i.e. more controls in the window results in a longer time that that the chrome heading is shown before being upated.

If it helps, the delay is also visible in the 'material design extensions - demo' app.

Is there something that can be done to reduce the delay? Perhaps applying the brush before the window is shown might eliminate the delay all together?