1.首先保证你设置的SelectionBrush不是透明的颜色或者和背景色相同2.在使用SelectAll之前要保证Textox以及获取到焦点。this.textbox.SelectionBrush = Brushes.Blue; this.textbox.Focus(); this.textbox.SelectAll();