dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.08k stars 1.17k forks source link

TreeGridList control #9841

Open YkTru opened 1 month ago

YkTru commented 1 month ago

Is there a simple way/upcoming WPF control to create a tree folder structure similar to Mac TreeView in finder? I have a feeling that most Destkop applications with an integrated project/file browser would benefit greatly from this. Devexpress and others are not an option for me. Thank you very much.

505505040

miloush commented 1 month ago

You could use ListView and manage the items yourself in a linear fashion (i.e. insert children when expanded etc.)

YkTru commented 1 month ago

@miloush do you have a sample please? Thank you

miloush commented 1 month ago

Sure TreeGridList.zip

YkTru commented 1 week ago

@miloush Hi sorry I've just seen this update;

I'm unable to run it though, do you have a run-able version?

Or could you please just post a gif showing how it look at runtime? I'll figure out then how to tailor it for my own needs.

Thank you a lot

miloush commented 1 week ago

Why are you unable to run it?

Image

YkTru commented 1 week ago

Excellent it looks great!

I get "Azure" related errors (I don't use Azure so reading the exceptions details is kind of cryptic to me)

Is there a reason why there is no sln file in the zip? Maybe by 'copy-pasting' I made errors

miloush commented 1 week ago

There is no Azure involved, you should be able to open the csproj in VS.

YkTru commented 1 week ago

@miloush after some tweaking of the csproj file it works! Thank you a lot!

YkTru commented 1 week ago

@miloush sorry just one last thing; when I run the app, I get these (combined) binding failures (and every time I click and item):

Severity    Count   Data Context    Binding Path    Target  Target Type Description File    Line    Project
Warning 3   DirectoryInfo   Length  TextBlock.Text  String  Length property not found on object of type DirectoryInfo.          

Is this something I should be concerned about, or can I just ignore it?

Thank you

miloush commented 1 week ago

No you can ignore it, directories don't have a size.