.net - C# WPF : ComboBox editabled with TreeView -
i have seen lot of topic creating combobox using treeview not editable 1 (the topics shows things no use of comboboxes).
i using combobox grid panel.
here xaml using :
<window x:class="danddadventures.xaml.addpjwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:danddadventures.xaml" xmlns:sys="clr-namespace:system;assembly=mscorlib" mc:ignorable="d" title="example" height="300" width="300"> <dockpanel> <grid verticalalignment="top"> <grid.columndefinitions> <columndefinition width="1*"/> <columndefinition width="1*"/> </grid.columndefinitions> <grid.rowdefinitions> <rowdefinition height="1*"/> <rowdefinition height="1*"/> <rowdefinition height="1*"/> </grid.rowdefinitions> <combobox grid.column="1" grid.row="2" iseditable="true" x:name="racecb"> <comboboxitem horizontalalignment="stretch"> <treeview itemssource="{binding children}" x:name="racetv" selecteditemchanged="racetvselecteditemchanged" > <treeviewitem header="hello"> <treeviewitem header="hellolvl2"/> </treeviewitem> </treeview> </comboboxitem> <combobox.text> <binding path="selecteditem.header" elementname="racetv" mode="oneway"/> </combobox.text> </combobox> </grid> </dockpanel> </window>
when have selected item, combobox shows "system.windows.controls.comboboxitem"
i don't know , need combobox editabled.
thank lot !
Comments
Post a Comment