wpf - ComboBox Whith a TreeView -



wpf - ComboBox Whith a TreeView -

i need create usercontrol combobox. in items in need treeview , button. if navigate tree item should go text box in bottom. if click button tree should collapsed. first thought isn't good.

<stackpanel orientation="vertical"> <stackpanel orientation="horizontal"> <textbox text="{binding adresse, mode=twoway}" maxlength="50" minwidth="170" grid.row="5" margin="5,2,5,2"/> <button width="25" margin="2" click="down"> <image source="/c1_net;component/images/arrow.jpg" horizontalalignment="left" /> </button> </stackpanel> <stackpanel x:name="tree" orientation="vertical" visibility="collapsed"> <sdk:treeview height="200" name="treeview1" width="200" /> <button content="{binding path=applicationstrings.okbutton, source={staticresource resourcewrapper}}" width="75" margin="5" click="onok" horizontalalignment="right"/> </stackpanel> </stackpanel> </grid>

if switch visible command needs more space. need bring tree in front end of rest of window. ideas?

ok.

i think should revisit interaction.

my problemm wase think if select item, tree wood closed. navigate in hirarchical dataobjekt , set path selectet item. somting this:

public interface itreeviewitemmodel { string selectedvaluepath { get; } bool isexpanded { get; set; } bool isselected { get; set; } ienumerable<itreeviewitemmodel> gethierarchy(); ienumerable<string> getdisplayhierarchy(); ienumerable<itreeviewitemmodel> getchildren(); }

and.

public class comboboxtreeview : combobox { private extendedtreeview _treeview; private contentpresenter _contentpresenter; public comboboxtreeview() { this.defaultstylekey = typeof(comboboxtreeview); }

......

i found http://vortexwolf.wordpress.com/2011/04/29/silverlight-combobox-with-treeview-inside/

wpf user-controls combobox

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -