Search code examples
c#.netlistviewgtk#virtualmode

VirtualMode in Gtk.ListStore?


I'm looking for a feature within the Gtk.ListStore that working like the ListView.VirtualMode in Winforms.

Is there something like that?


Solution

  • Gtk#'s ListStore is a collection type like the ArrayList in .NET. Its not a visual widget. It represent the simplified version of the Gtk#'s TreeStore Model in the Model-View-Controller design pattern.

    The Winform's ListView on the other hand is a visual control. It represents the View component in the Model-View-Controller design pattern.

    You are comparing apples with oranges.

    Gtk#'s visual widget that would be similar in functionality to Winforms ListView or TreeView would be a Gtk"'s TreeView . The Model property of a Gtk# TreeView can be assigned a collection that implements the Gtk# TreeModel interface. Now Gtk#'s ListStore implements the TreeModel interface therefore it can be assigned to the Gtk# TreeView's Model property. Thats how databinding works in Gtk#.

    Gtk# databinding paradigm is a little hard to grasp but is very powerful once you get a hold on it.