WPF: ListView as treeview (with GroupItem) - wpf

Is there a way to render a ListView (using Group Item) as a treeview? Maybe hierarchical template can be useful.
BTW, which WPF control was it build (TreeView or ListView)?:
Undefined Control

This is what you may be lookking for. Although there is another similar thread awating reply... WPF DataGrid with TreeView type hierarchy

I believe is a TreeView(Custom One) if you would like to see an example of treeView see this... thread..

Related

datarepeater like control in Silverlight?

I need some kind of control to wrap my UI (which generates using binding). Currently I use ListBox but not sure if it's lightest or best choice. I just need placeholder that I can bind to and insert my controls.
You're probably looking for the ItemsControl
You can use any control that takes a list of entities as it's data source.
This could be DataGrid, ListBox (as you are already using) or anything that inherits from ItemsControl - this includes things like the TabControl as well.

Simple WPF ItemsSource Control

This feels like a stupid question, but is there a simple control for WPF that just displays a collection of items? I am currently using a ListBox to display a collection of usercontrols, but the selection element is not needed and the highlighting is actually a distraction. I could disable the highlighting, but this seems like extra work if a simpler control exists. I don't need to track the selected item.
Basically, I want a stackpanel that I can just define an itemssource of viewmodels for. Does such a thing exist?
You can use an ItemsControl - it's pretty much exactly what you are looking for

Display Different Views (Thumbnail,Details List) in Wpf from ListView in MVVM

I have a DataGrid that is displaying Data. I want to implement view switching functionality in WPF. I have read online and they say it's not possible with Data Grid .
There is also a topic that explains thumbnail view:
WPF: ListView with icons view?
But how to implement the same three view in the same control?
To be exact, I want the functionality like Windows Explorer where we can change the view from a dropdown list.
Some help in this regard would be great.
You are right. This is not something that the DataGrid supports. You can create your own views for the ListView, see the following article:
How to: Create a Custom View Mode for a ListView

WPF and treeview: tricks with Items

I have some questions about treeview in WPF.
How can I change header of selected item?
How can I add child Items to selected item?
Use MVVM. In your HierarchicalDataTemplate, bind Header and ItemsSource to properties in your view model which implement change notification. Now any changes you make to those properties will be reflected in the TreeView.
If you're not using MVVM and data binding to populate the TreeView, you're wasting a lot of effort.
Robert is right, you should use MVVM and data binding. The tutorial that IMHO explained it best is here

How do I bind a TreeView node to a specific view in an Explorer-like UI?

I'm sure there is a simple answer to this but I can't seem to find it. Most examples for binding TreeView nodes are about using a ListView to show the node's details. In the scenario I am working on I've got a TreeView data bound to an Xml document using a simple MVVM pattern. As each node is selected in the TreeView I want to show a different UserControl for the type of XmlNode being represented.
What is the best control for hosting the different View's? (ViewBox, Panel?)
What's the best way to bind the view to the Selection in the treeview?
Thanks
In an application I'm working on I have a similar scenario. You should use UserControl to host your views.
In the TreeView each item controls its own IsSelected state. Have you tried binding to the TreeView's SelectedItem property? What I actually did was create an attached property for the mouse double click, and bound it to a Command. I defined this binding in my HierarchicalDataTemplate.

Resources