AvaloniaUI / Avalonia.Controls.TreeDataGrid

A combined TreeView/DataGrid for Avalonia.
MIT License
234 stars 49 forks source link

TreeDataGrid does not work unless you are running FluentTheme #245

Closed KentSwan closed 6 months ago

KentSwan commented 6 months ago

Issue Description:

TreeDataGrid will not display anything unless (1) you've set FluentThem in App.axaml AND (2) you must add a StyleInclude for its FluentTheme control styling file. For several reasons, I've found that FluentTheme (1) makes a lot of style design choices that have to be overridden or undone and (2) in some cases locks out the ability to style certain properties on some controls. In contrast, I've found that, for the most part, SimpleTheme works better as a less hostile application-based style set.

On Checking, I found that TreeDataGrid does not have a SimpleTheme selector and thus cannot display when using SimpleTheme as the application base theme.

While it is my personal opinion that every control should have intrinsic internal styling defaults that are sufficient to display and operate the control without a StyleInclue file, I am aware that, for complex composited controls like TreeDataGrid and DataGrid that is simply isn't a viable approach to styling the control. In these cases, the controls' default styling should be it's SimpleTheme.

I note in passing that DataGrid, which I also use, has both Fluent and Simple themes.

To Reproduce:

Try to get TreeDataGrid to display with App.axaml set to SimpleTheme with and without a StyleInclude for TreeDataGrid.:

Expected Behavior:

I expected to be able to select a SimpleTheme for TreeDataGrid having simple basic styling, per my discussion above for the TreeDataGrid, and have it show up in the designer so that IntelliSense in my view.axaml file works.

maxkatz6 commented 6 months ago

https://github.com/AvaloniaUI/Avalonia.Controls.TreeDataGrid/issues/246