如何在wpf中编辑树视图中的项目

时间:2013-08-07 09:10:37

标签: wpf mvvm wpf-controls wpf-4.0 treeviewitem

我的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”开头,我想编辑TextBox

我基本上双击我的TreeViewItem,我应该可以输入它。

我该怎么做?

0 个答案:

没有答案