简体   繁体   中英

Change selected Text Color in textbox

How can I change the color of selected text in textbox I try in textbox style.

<ResourceDictionary x:Key="Default">
<SolidColorBrush x:Key="TextSelectionHighlightColorThemeBrush" Color="#FFD1D1D1"/>
</ResourceDictionary>

I also try that but it doesn't work.

It's impossible directly.But you you are using something like MahApps you can change it theme color, thats affects the highlight text. To learn how to change this color, already have a question with a good answer there:

Changing The MahApps Metro Theme

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM