Replies: 3 comments 9 replies
-
|
I personally think having to manually define rows/columns is extremely tedious. Avalonia used to have a control called AutoGrid, which would automatically do it all for you. It is however now extremely out of date. https://github.com/AvaloniaUI/AvaloniaAutoGrid I don't personally see the point in naming them though. I almost never reference a grid from code behind, and even when I do; I typically only care about the grid itself. In most cases I just want the grid to display stuff without much ceremony. I don't think I have ever had a dynamic grid either. I typically just use a datagrid at that point. |
Beta Was this translation helpful? Give feedback.
-
|
I see a lot of value in this idea. I have spent way too much time renumbering Grid.Row's or Grid.Column's properties ! However, I think this should be implemented as a XAML extension for the regular grid, and not by creating a specialized derived control. |
Beta Was this translation helpful? Give feedback.
-
|
Resolving the vexing renumbering issue is certainly worthwhile, but I don't believe it's necessary to introduce a new naming convention (which offers little benefit and constitutes a new API). Instead, adding a XAML Code Fixer can achieve the same result: simply add “Insert row/column before/after” within the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I see that Avalonia's
Gridcontrol offers a simplified way to define columns and rows compared to WPF's, where eachColumnDefinition/RowDefinitionhad to be listed as a separate Xml element. So far, so good.One thing I have always been missing from WPF's
Gridcontrol was, however, that its column and row referencing is based on indexes. In practice, I have always found this quite cumbersome:On top of that, the fact that
ColumnDefinitionandRowDefinitionare named differently (not nice for copy-and-pasting if you want to "transpose the matrix") is unfortunate.That's why, many years ago, I created a WPF control called
NameBasedGrid(Github; Nuget), which has served me well in plenty of projects:ColumnDefinitionandRowDefinitionwith aColumnOrRowelement (though if there is an English word that really is a general term for columns and rows, I'd be happy to hear it).Please have a look at one of the sample files for an overall impression.
Even though the above control used to fulfil my needs, time and again I wondered why I need an extra Nuget package (and extra namespaces in my Xaml), as that functionality seemed such an obvious omission in the original WPF grid to me.
With Avalonia, here's where I see a chance: Do the people behind Avalonia, in particular the
Gridcontrol, think the column/row naming capability would be a worthwhile extension to Avalonia's standardGrid?If so, I would like to help.
Beta Was this translation helpful? Give feedback.
All reactions