Replies: 1 comment 1 reply
-
Good idea imo. But one could have 2 or three templates then. I think of
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This originated as a counter-proposal to the main ideas in: "Discussion to create Avalonia.Toolkit" #7929
I'm generally against several of the ideas in the Toolkit discussion related to separating controls out of Avalonia itself. While the toolkit proposal is delayed for now, I know this discussion is going to come up again after 11.0 release (possible for 12.0). Therefore, I would like to offer some ideas and a general counter-proposal as a compromise.
My very general point (among others I'll save for discussion in #7929 itself) is that Controls are fundamentally important for a UI framework and shouldn't be in a more general-purpose toolkit. Controls are critically important to adoption of a UI framework and we've all come to expect a certain baseline of conrols from WPF/WinUI that I think Avalonia should support by default. However, certain Avalonia platforms and applications don't need anything but the very basics (Panel, etc.) anything more is overkill and can hurt performance. I think this, along with maintainability concerns, is the main reason the Toolkit was proposed.
So this counter-proposal is essentially creating separate nuget packages for controls; however, not putting them in a Toolkit. I think a Toolkit should be reserved for much more esoteric or experiental controls and also for non-control code (think MVVM stuff and helpers in the UWP community toolkit).
Here are some of the packages I'm proposing:
Avalonia.Controls
: Contains literally all the controls that can be separated from core Avalonia. If you are using Avalonia just for rendering or 2D/3D graphics you don't need this package. However, everyone else needs it and it should be included in all default project templates. Only those that don't need it and want to save space can remove it (opt-out). Note that controls in this package use the exact sameAvalonia.Controls
namespace so usage is transparent (sharing the same namespace is a key feature of this proposal).Avalonia.Controls.DataGrid
: This comes along as it always has. It is installed by default with project templates and also is opt-out for those that don't need it and want to save space.Avalonia.Controls.ColorPicker
: Will be a new package handled the same way as DataGrid. Included by default and opt-out for those that don't need it.Future packages can easily be added.
This proposal's main points are:
Avalonia.Controls
orAvalonia.Controls.*
namespace to avoid using/namespace trouble. It makes things transparent and appear fully integrated for the majority of developers.Avalonia.Controls
.Beta Was this translation helpful? Give feedback.
All reactions