Hi,
Attached image displaying an user interface which is implemented in C++ and QT framework under Mac OS X. I put all information(as Folder Name, Folder id, etc.) of each items of left pane tree in a linked list. Now I want to implement this user interface in C# and Xamarin under Mac OS X. My first priority is to create folder tree in left pane of the image. I am using outline view to create this tree. Is it possible to create this tree using outline view or need to use other view and controller. I am following the mac-samples uploaded on github. But could not understand. Kindly guide me and suggest simplest way to create the user interface according to image.
Answers
https://docs.microsoft.com/en-us/xamarin/mac/user-interface/table-view
Reed this instruction, chapter - Using Images in Table Views
NSTableView and NSOutlineView is very similar, you need to implement your own delegate and create your own implementation of - public override NSView GetView (NSOutlineView outlineView, NSTableColumn tableColumn, NSObject item)
where you return NSTableCellView with Image
NSTableCellView view = (NSTableCellView)tableView.MakeView (tableColumn.Title, this);
view.ImageView.Image = NSImage.ImageNamed ("Name.png");
or you can just return NSImageView
may be you also need to read instruction about NSOutlineView
https://docs.microsoft.com/en-us/xamarin/mac/user-interface/outline-view
Yes, NSTableView/NSOutlineView are non-trivial to figure out the first time. The documentation linked above is perfect.
There are two samples that may help as well:
https://github.com/xamarin/mac-samples/tree/master/MacTables
https://github.com/xamarin/mac-samples/tree/master/NSTableViewBinding