Darf
Darf

Reputation: 2585

Create an editable wpf treeview item

I'm checking this page and I like the only answer there is.

Editable WPF treeview item on doubleclick? (with styles?)

But I don't like the idea to use c# lines, Might there be a possible to write that code using XAML?

Upvotes: 0

Views: 2126

Answers (2)

Learner
Learner

Reputation: 1542

You can use CheckBox in the XAML and using its IsChecked property change the Style to the Editable mode

Upvotes: 0

stukselbax
stukselbax

Reputation: 5935

You can use EventSetter, or AttachedBehavior. But they are assumes that you need c# code-behind.

How to do it in XAML - hard to say. One more possible way - to use x:Code clause to write c# code inside xaml.

Upvotes: 1

Related Questions