Sergey Metlov
Sergey Metlov

Reputation: 26321

How to create List-like UserControl in WPF?

I want to create my own expandable/collapsable tree-like UserControl, which nodes are the Border elements with any content. And this control should have the single SelectedItem. When I select one of the nodes I want to see details information about selected item.

I've done the control's presentation and a piece of logic: I can see all the tree of elements, collaps any node(s), select one of them and see details. But I can't do bidirectional binding. I.e. I want to have an opportunity to change fields in details panel and immidiately see changes in the tree-control.

Help me please either call force update (rebind data) of the control (just give a tip how to perform this) or give an advise how to create my own List-like UserControl. I tried to make my control inherit from some ListBox class but I couldn't.

PS. Sorry for my bad English...

Upvotes: 1

Views: 299

Answers (1)

SLaks
SLaks

Reputation: 887797

Use the TreeView control.

Upvotes: 2

Related Questions