TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ranganath L
NA
112
2.9k
Rename the child nodes
Sep 12 2018 2:06 AM
Hi,
How to Rename the child nodes of a dynamically loaded tree in WPF.
I am creating My Tree View Programatically in C#.
I want to Edit the Child nodes of the tree on double click. How can i achieve this.
This is .CS File
private void LoadTree1()
{
TreeViewItem treeItem = null;
treeItem = new TreeViewItem();
treeItem.Header = "North America";
treeItem.IsExpanded = true;
treeItem.Items.Add(new TreeViewItem() { Header = "USA" });
treeItem.Items.Add(new TreeViewItem() { Header = "Canada" });
treeItem.Items.Add(new TreeViewItem() { Header = "Mexico" });
tvMain.Items.Add(treeItem);
}
This is my XAML file
<TreeView Grid.Row="0" x:Name="tvMain">
</TreeView>
I should be able to edit USA,Mexico or Canada on double click on them.Pls help me out to achieve this
Thanks in Advance
Reply
Answers (
1
)
object drop in canvas on button click event
WPF Application Image Post on Facebook