create an empty project in vs2017, add 7 dll in my project, add following code, compile ok,
the data in NodeView didn't show, just empty.
namespace Project1
{
public class NodeViewExample : Gtk.Window
{
public NodeViewExample() : base("NodeView")
{
SetSizeRequest(200, 150);
// Create our TreeView and add it as our child widget
Gtk.NodeView view = new Gtk.NodeView(Store);
Add(view);
// Create a column with title Artist and bind its renderer to model column 0
view.AppendColumn("Artist", new Gtk.CellRendererText(), "text", 0);
// Create a column with title 'Song Title' and bind its renderer to model column 1
view.AppendColumn("Song Title", new Gtk.CellRendererText(), "text", 1);
view.ShowAll();
}
protected override bool OnDeleteEvent(Gdk.Event ev)
{
Gtk.Application.Quit();
return true;
}
Gtk.NodeStore store;
Gtk.NodeStore Store
{
get
{
if (store == null)
{
store = new Gtk.NodeStore(typeof(MyTreeNode));
store.AddNode(new MyTreeNode("The Beatles", "Yesterday"));
store.AddNode(new MyTreeNode("Peter Gabriel", "In Your Eyes"));
store.AddNode(new MyTreeNode("Rush", "Fly By Night"));
}
return store;
}
}
public static void Main()
{
Gtk.Application.Init();
NodeViewExample win = new NodeViewExample();
win.Show();
Gtk.Application.Run();
}
}
}
Current Behavior
the NodeView is empty.
Expected Behavior
it should contain 3 row data and 1 line column header.
Steps to Reproduce
Current Behavior
the NodeView is empty.
Expected Behavior
it should contain 3 row data and 1 line column header.
On which platforms did you notice this
[ ] macOS [ ] Linux [*] Windows
win 10:
Stacktrace