2017-04-18 07:52:04 +08:00
|
|
|
## WPF TextBox selected text appears a different color when the text box is inactive
|
2017-04-06 04:52:19 +08:00
|
|
|
|
|
|
|
### Scope
|
|
|
|
Edge
|
|
|
|
|
|
|
|
### Version Introduced
|
|
|
|
4.5
|
|
|
|
|
|
|
|
### Source Analyzer Status
|
|
|
|
Available
|
|
|
|
|
|
|
|
### Change Description
|
2017-04-21 02:19:05 +08:00
|
|
|
|
2018-03-01 08:06:28 +08:00
|
|
|
In .NET Framework 4.5, when a WPF text box control is inactive (it doesn't have focus),
|
2017-04-21 02:19:05 +08:00
|
|
|
the selected text inside the box will appear a different color than when the
|
|
|
|
control is active.
|
2017-04-06 04:52:19 +08:00
|
|
|
|
|
|
|
- [ ] Quirked
|
|
|
|
- [ ] Build-time break
|
|
|
|
|
|
|
|
### Recommended Action
|
2017-04-21 02:19:05 +08:00
|
|
|
|
2018-03-01 08:06:28 +08:00
|
|
|
The previous (.NET Framework 4.0) behavior may be restored by setting the
|
2017-04-21 02:19:05 +08:00
|
|
|
<xref:System.Windows.FrameworkCompatibilityPreferences.AreInactiveSelectionHighlightBrushKeysSupported>
|
|
|
|
property to `false`.
|
2017-04-06 04:52:19 +08:00
|
|
|
|
|
|
|
### Affected APIs
|
|
|
|
* `T:System.Windows.Controls.TextBox`
|
|
|
|
|
|
|
|
### Category
|
|
|
|
Windows Presentation Foundation (WPF)
|
|
|
|
|
2017-04-18 07:52:04 +08:00
|
|
|
<!-- breaking change id: 4 -->
|