如何在wpf中编辑树视图中的项目
我的如何在wpf中编辑树视图中的项目,wpf,mvvm,wpf-controls,wpf-4.0,treeviewitem,Wpf,Mvvm,Wpf Controls,Wpf 4.0,Treeviewitem,我的TreeViewItemTemplate如下所示 <TreeView.ItemTemplate> <HierarchicalDataTemplate ItemsSource="{Binding Connections}"> <WrapPanel > <CheckBox VerticalAlignment="Center" Command="{Binding UpdateConnections}" Co
TreeView
ItemTemplate
如下所示
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Connections}">
<WrapPanel >
<CheckBox VerticalAlignment="Center" Command="{Binding UpdateConnections}" CommandParameter="{Binding}" IsChecked="{Binding Status, Mode=TwoWay}" Focusable="False" Style="{StaticResource ResourceKey=TreeView_CheckBox_Style}"></CheckBox>
<TextBlock Text="{Binding Name}" Style="{StaticResource ResourceKey=treeTextBoxStyle}" />
</WrapPanel>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
我正在使用MVVM。如果我的树项目以“s”开头,我想编辑文本框
我基本上是双击我的treevieItem
,我应该能够输入它
如何操作?我可以看到文本块
,但没有任何文本框
。好的。我想编辑tat textBlock。如何操作。TextBlock
是只读的。您最好使用TextBox
并操作其IsReadOnly
属性。