Universal Windows Platform (UWP)
A Microsoft platform for building and publishing apps for Windows desktop devices.
2,903 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
i set the foreground of a textbox as gradient but it has no effect
Thanks
Lineargradientbrush foreground of texbox
Hello,
Welcome to Microsoft Q&A,
I'm afraid you can't set LinearGradientBrush
for TextBox
, Because the TextBox Foreground does not support LinearGradientBrush
. You could only set LinearGradientBrush
for Background or placeholder for TextBox
.
And if you want to set solid color for the Foreground. Please refer this document . And you could also use the following directly
<SolidColorBrush x:Key="TextControlForeground" Color="Red"/>
<SolidColorBrush x:Key="TextControlForegroundPointerOver" Color="Red"/>
<SolidColorBrush x:Key="TextControlForegroundFocused" Color="Red"/>
<SolidColorBrush x:Key="TextControlForegroundDisabled" Color="Red"/>
Thanks
Nico Zhu