Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF: Label to TextBox when selected

Tags:

wpf

I would like to create a simple designer which looks like visual studio. Specifically, I would like my items to have the same behavior as in VS: when they're not selected, a simple label/textblock is shown, when they're selected a textbox lets me edit the value. Which is the best way to achieve this?

Thank you

like image 653
fra Avatar asked Nov 23 '25 12:11

fra


1 Answers

create a control template for the TextBox and change the appearance of the TextBox as you like when the control is focused or it has content inside.

like image 159
Kishore Kumar Avatar answered Nov 26 '25 06:11

Kishore Kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!