Quantcast
Channel: Silverlight Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 801

Commented Issue: PhoneTextBox Text Color reverts to Hint Forecolor when clearing out Text [10476]

$
0
0
Scenario:

1) Navigate to a page Containing a PhoneTextBox that has a Hint associated with it.

2) Type some text in the PhoneTextBox

3) Erase the contents of the TextBox

4) Start typing new text.

The Forecolor is now light grey as the user types until the PhoneTextBox loses Focus and regains Focus. The user has to click off the PhoneTextBox and click back on it to see the EditText Forecolor.
Comments: ** Comment from web user: dbau56789 **

Hi Shawn,

I think it's a bit more complicated than the solution you checked in.

First, if I update the Text programmatically, I want the hint visibility to disappear. It all depends on whether the PhoneTextBox has focus or not. If the Text is set programically with changeset 74775, the hint stays visible until the TextBox gains focus.

Second, I don't think it is necessary to set the Foreground for the entire control when the hint visibility changes or the TextBox gains focus. Just setting the Foreground for the HintContent element to the PhoneTextBoxReadOnlyBrush static resource in the Generic.xaml should accomplish what is needed.

For example, if the Text is set programmatically the text color is the PhoneTextBoxReadOnlyBrush because the UpdateHintVisibility is called in the ApplyTemplate method() which sets the Foreground for the entire control to the PhoneTextBoxReadOnlyBrush until the TextBox gains focus. At which time the control Foreground is set to the PhoneTextBoxForegroundBrush (which it should be anytime text exists).


Viewing all articles
Browse latest Browse all 801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>