本文介绍了如何在Combobox中显示树视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我需要在一个comboxbox中的treeview中显示show数据。可以任何人说或者给一个控件来源,这样我就可以自定义我的需求解决方案 你需要这样的东西吗? < 网格 > < ComboBox x:名称 = comboBox Horizo​​ntalAlignment = 左 高度 = 41 保证金 = 62,44,0, 0 VerticalAlignment = Top 宽度 = 347 > < ComboBoxItem > < ComboBoxItem.Template > < ControlTemplate > < TreeView 高度 = 自动 > < TreeViewItem 标题 = 1级 / > < TreeViewItem 标题 = Level 1 B IsExpanded = True > < TreeViewItem 标题 = 等级2 / > < ; / TreeViewItem > < / TreeView > < / ControlTemplate > < / ComboBoxItem.Template > < / ComboBoxItem > < / ComboBox > < / Grid > I need to show the show datas in treeview inside a comboxbox..Can any one say or give a control with source so that i can customize to my reqirements 解决方案 Do you need something like this?<Grid> <ComboBox x:Name="comboBox" HorizontalAlignment="Left" Height="41" Margin="62,44,0,0" VerticalAlignment="Top" Width="347"> <ComboBoxItem> <ComboBoxItem.Template> <ControlTemplate> <TreeView Height="auto"> <TreeViewItem Header="Level 1 A" /> <TreeViewItem Header="Level 1 B" IsExpanded="True" > <TreeViewItem Header="Level 2"/> </TreeViewItem> </TreeView> </ControlTemplate> </ComboBoxItem.Template> </ComboBoxItem> </ComboBox></Grid> 这篇关于如何在Combobox中显示树视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-05 14:26
查看更多