Fl4ke
Topic Author
Posts: 3
Joined: 21 Oct 2019, 17:30

Different behaviour for typed styles in v3?

27 Aug 2020, 18:28

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
 
User avatar
sfernandez
Site Admin
Posts: 2991
Joined: 22 Dec 2011, 19:20

Re: Different behaviour for typed styles in v3?

27 Aug 2020, 19:48

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.
 
Fl4ke
Topic Author
Posts: 3
Joined: 21 Oct 2019, 17:30

Re: Different behaviour for typed styles in v3?

27 Aug 2020, 21:17

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

Who is online

Users browsing this forum: Bing [Bot] and 60 guests