Page 1 of 1

Different behaviour for typed styles in v3?

Posted: 27 Aug 2020, 18:28
by Fl4ke
Hi,
Just a quick question about typed styles to check if this is a bug or intended behaviour. In v2 and in WPF typed styles implicitly inherit the default style for that type. In v3 that seems no longer the case. Example which results in a non-animated pink button:


To get the desired behaviour I now have to specify the BasedOn property:


Best regards

Re: Different behaviour for typed styles in v3?

Posted: 27 Aug 2020, 19:48
by sfernandez
It is intended behavior.

In Noesis v2 we provided an internal theme with full default styles for all controls, with many properties set and a simple default template. But that style was not pretty (and we don't liked the idea of users releasing applications with it) and in many cases was totally overriden by user theme, incurring in unnecessary increase of loading times and memory.

In Noesis v3 we provide a minimal debug theme for default styles with no properties set and pink templates, so user can easily detect when their application is using them instead of the styles defined for the application. We want to enforce the use of user defined styles with this change, so anytime you define a local style (typed or named) you should use BasedOn to extend your custom styles.

You can read more about it in our styles tutorial.

Re: Different behaviour for typed styles in v3?

Posted: 27 Aug 2020, 21:17
by Fl4ke
Thanks for the quick reply.
That does indeed make sense and thank you very much for the explanation! :)
I actually looked at the documentation but missed exactly that part, my bad..
Best regards