Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Don't change cursor over TextBox

I am trying to make a TextBox look like a TextBlock to the user (it is in a treeview that I want to allow renaming in). I was able to do this by applying a style to set the border and background to transparent and the IsReadOnly property to true. My only problem is that the mouse cursor still changes from the pointer style to the editing (caret) style. Is there an easy way to disable this (preferably in xaml)?

like image 683
KrisTrip Avatar asked Sep 17 '25 23:09

KrisTrip


1 Answers

Sure, just set the TextBox's Cursor property to Arrow

<TextBox Cursor="Arrow" />
like image 91
Rachel Avatar answered Sep 19 '25 15:09

Rachel