Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable selection richtextbox wpf

Any clue how do we can implement it?

This link doesn't help a lot...

http://social.msdn.microsoft.com/Forums/en-US/winformsdesigner/thread/d1132ee5-acad-49f3-ae93-19d386fe2d12

like image 475
Friend Avatar asked Sep 11 '12 13:09

Friend


3 Answers

just disable focus

  Focusable="False" 

or

  IsHitTestVisible="False"

if you need to hide selection

  SelectionOpacity="0"
like image 185
Alex Avatar answered Oct 15 '22 01:10

Alex


Focusable="False" works for you, but the cursor is still selectable so what you need is this:

Focusable="False"
Cursor="Arrow"
like image 24
Idan Avatar answered Oct 15 '22 02:10

Idan


IsTextSelectionEnabled is the property I'm using in WinRT...

like image 45
bc3tech Avatar answered Oct 15 '22 03:10

bc3tech