views:

29

answers:

2

Hi

I was wondering if I can have a ComboxBox with a Treeview as the selector rather than a list?

I note that there is a ComboBox.ItemsPanelTemplate, but I don't know what I need to do to get this to work?

I could build a control 'from the ground-up' with a separate TextBox, Button and TreeView in a PopUp control, but wondered if there is an easier way.

Lee

+1  A: 

Are you just wanting the combobox for presentation purposes regarding the treeview?

Why not use a treeview as is and just trigger the display via visibility or animation from a button or control of some sort?

Jeff Gwaltney
I could build the combobox effectively from scratch as you suggest, but I would rather re-use if I can.
Lee Atkinson
With regard to your first question, I'm not quite sure what you mean, but the treeview will be used to select the current item of the combobox, and the textual part of the combobox will hold the 'path' of the item (the treeview represents a file system)
Lee Atkinson
I guess I'm not grasping visually what you are shooting for. Sounds kinda bizarre. Are you wanting a treeview control selection to trigger a selection on a separate combobox? OR are you talking about a Combobox containing a treeview?
Jeff Gwaltney
I want a combobox that, rather than has a 'one-dimensional' list for selecting it's vale, and treeview. In other words, the treeview appears in the dropdown of the combobox.
Lee Atkinson
A: 

This link can help you.

Samvel Siradeghyan
Thanks I will have a look at this - it seems odd to use the ItemTemplate rather than the ItemsPanelTemplate though, don't you think?
Lee Atkinson