This is a migrated thread and some comments may be shown as answers.

Set Foreground for watermarked: EmtyText

4 Answers 116 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Triet Nguyen Cong
Top achievements
Rank 2
Triet Nguyen Cong asked on 08 Sep 2010, 05:48 AM
I want change foreground of EmtyText from Black color (current) to Gray color as WatermarkedTextBox's watermark?
i'm using NonEditableTemplate, i don't want to using EditableTemplate.
Help me!

4 Answers, 1 is accepted

Sort by
0
Accepted
Valeri Hristov
Telerik team
answered on 08 Sep 2010, 12:16 PM
Hi,

RadComboBox has a property EmptySelectionBoxTemplate which can be used instead of EmptyText. In this DataTemplate you could put a TextBlock with the desired color and text.

Sincerely yours,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Murray
Top achievements
Rank 2
answered on 17 Jan 2014, 05:44 PM
Hi Valari

Is there a way to use this template if the RadComboBox is:
  • IsReadOnly="True"
  • IsEditable="True"

the template you suggested only seems to work if the RadComboBox is not editable.

0
Vladi
Telerik team
answered on 21 Jan 2014, 08:42 AM
Hello,

When the control is in edit mode the displayed template is a simple TextBox. In order to set a Empty Text to that TextBox all you need to do is set the EmptyText of the control. Setting a more complex DataTemplate when the control is in that mode is not possible since the ComboBox relies on the input text in order to trigger its editable functionalities like the searching functionality.

Hope this is helpful.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Murray
Top achievements
Rank 2
answered on 21 Jan 2014, 01:29 PM
How embarrassing! I forgot about that property

Thanks Vladi
Tags
ComboBox
Asked by
Triet Nguyen Cong
Top achievements
Rank 2
Answers by
Valeri Hristov
Telerik team
Murray
Top achievements
Rank 2
Vladi
Telerik team
Share this question
or