关于WPF中TextBox使用SelectAll无效的问题的解决办法

1.首先保证你设置的SelectionBrush不是透明的颜色或者和背景色相同

2.在使用SelectAll之前要保证Textox以及获取到焦点。

this.textbox.SelectionBrush = Brushes.Blue;
this.textbox.Focus();
this.textbox.SelectAll();
原文地址:https://www.cnblogs.com/DoNetCoder/p/4037197.html