You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a crude brainstorm, from an Avalonia noob.
As I'm wading my way through the Default/Fluent Style AXAML's, and learning more about how all this works, and as I look at the AXAML for declaring styles, I can't help but note the long-strings with repetitive portions of each string such as:
Would it be a feasible concept to convert this to C# notation? I would picture a style being a set by C# classes, and even permit overrides, so that styles could inherit/polymorph from other styles in a C# fashion. Of course it would also permit the inclusion of arbitrary children to add to it's collection of Resources (or override existing ones).
Then the implicit AXAML based ResourceKeys would use Class Name as part of the key name with "dot-notation" such as:
<Panel Background="RadioButton.Background" />
And then in C#, if you were using Markup.Declarative plugin for your UI composition, to reference a Resource, do this:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is a crude brainstorm, from an Avalonia noob.
As I'm wading my way through the Default/Fluent Style AXAML's, and learning more about how all this works, and as I look at the AXAML for declaring styles, I can't help but note the long-strings with repetitive portions of each string such as:
Would it be a feasible concept to convert this to C# notation? I would picture a style being a set by C# classes, and even permit overrides, so that styles could inherit/polymorph from other styles in a C# fashion. Of course it would also permit the inclusion of arbitrary children to add to it's collection of Resources (or override existing ones).
Then the implicit AXAML based ResourceKeys would use Class Name as part of the key name with "dot-notation" such as:
And then in C#, if you were using Markup.Declarative plugin for your UI composition, to reference a Resource, do this:
And thus would look the same in C# vs. AXAML.
Targeted benefits I have in mind are:
My Current Perceived Issues:
Beta Was this translation helpful? Give feedback.
All reactions