Set Foreground for watermarked: EmtyText

5 posts, 1 answers
  1. Triet Nguyen Cong
    Triet Nguyen Cong avatar
    78 posts
    Member since:
    Mar 2010

    Posted 08 Sep 2010 Link to this post

    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!
  2. Answer
    Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 08 Sep 2010 Link to this post

    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
  3. DevCraft banner
  4. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 17 Jan 2014 Link to this post

    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.

  5. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 21 Jan 2014 Link to this post

    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 >>
  6. Murray
    Murray avatar
    121 posts
    Member since:
    Aug 2010

    Posted 21 Jan 2014 Link to this post

    How embarrassing! I forgot about that property

    Thanks Vladi
Back to Top
DevCraft banner