Replies: 1 comment 2 replies
-
It says already, that styles are required.
All of them. No exceptions at this moment. DataGrid is not included with the template, and it's distributed with separated package (although Avalonia.Diagnostics might reference it transitively). That's why it requires other styles to include. Also, for the same reason any third-party control will also require the same. |
Beta Was this translation helpful? Give feedback.
-
I spent hours trying to figure out why my Datagrid had no errors or warnings, but would not appear in the window. I assumed it was a binding error or issue with my ViewModel.
I did reference https://docs.avaloniaui.net/docs/controls/datagrid, but initially ignored the "Add required styles to App.axaml" section since I was just hacking up a quick proof of concept and didn't care what it looked like... even in prod development I would typically not bother with styling until everything was wired up.
I don't normally bother with the visual designer - but in desperation I checked it, and it was only there that I noticed...
Unable to resolve type DataGrid from namespace https://github.com/avaloniaui
Why is there no warning when running the app?
Is there any documentation/discussion on why DataGrid requires it's own style included?
I would like to update DataGrid documentation with something like:
⚠️ Control will not be visible without the DataGrid style (see [link to explanation])
What other controls require their own style?
Beta Was this translation helpful? Give feedback.
All reactions