Search code examples
c#wpftextboxfocus

Show textbox text highlight while textbox is out of focus


I have a textbox with some text in it. How do I prevent the textbox from hiding the selected text highlight when the textbox loses focus?


Solution

  • Set

    textBox1.IsInactiveSelectionHighlightEnabled = true;
    

    (Apparently this is new in Fx 4.5)