具有文本框的WPF TreeView:IsSelected-Property不可用

时间:2019-06-26 10:12:31

标签: wpf textbox treeview selected

IsSelected-Property不可用。对话框加载后,我想选择一个项目。

<TreeView x:**Name="tvBelege" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="3" Grid.ColumnSpan="2" MinHeight="200" MaxHeight="300" Margin="5,5,5,5" SelectedItemChanged="TvBelege_SelectedItemChanged"> <TreeView.ItemTemplate> <HierarchicalDataTemplate DataType="local:Beleg" ItemsSource="{Binding Projektphasen}"> <TextBlock Text="{Binding DisplayName}"/> </HierarchicalDataTemplate> </TreeView.ItemTemplate> </TreeView>

0 个答案:

没有答案