Rad expander expander button customisation

7 posts, 0 answers
  1. steve
    steve avatar
    23 posts
    Member since:
    Jul 2009

    Posted 09 Sep 2009 Link to this post

    Is it possible to change the colour of or indeed the image for the expander button. I want a traffic light type system indicating the data contained within the expander. ie set the expander button to red if i deem the data to be bad or green if i deem the data to be good, this should happen at run time...

    Thanks in advance
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 09 Sep 2009 Link to this post

    Hello stephen yeadon,

    Currently you will need to edit the control template of the Expander control. For Q3 release we are going to add a separate Style property for this specifically.

    Regards,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. steve
    steve avatar
    23 posts
    Member since:
    Jul 2009

    Posted 09 Sep 2009 Link to this post

    dont suppose you have a code snippet
  5. BlogReader
    BlogReader avatar
    27 posts
    Member since:
    Apr 2009

    Posted 10 Sep 2009 Link to this post

    A code snippet would benefit me too.
  6. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 14 Sep 2009 Link to this post

    Hello  Arjun,

    Attached you can find an example where a customized expander as a search bar. Below is short how to in order to customize the expander:
    1. Create new Style / Template for the expander - preview the App.xaml file.
    2. Create an appropriate layout in the expander's header - preview the MainPage.xaml file.
    3. Initialize the expander with the new Style.
    4. Note: I left the original toggle sign (an ellipse with a chevron inside). You should replace it with a nice looking icon to finalize the silky view.
    Please give it a try and let us know if there are more questions.

    Sincerely yours,
    Ivan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Asish
    Asish avatar
    31 posts
    Member since:
    Nov 2010

    Posted 13 Jan 2011 Link to this post

    Can you send me a sample application  by  changing  the arrow icon defined in rad expander, and changing the rad expander color
  8. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 17 Jan 2011 Link to this post

    Hello steve,

    In order to change the default RadExpander button, you can set the RadExpander DecoratorTemplate property which controls the expander button template. You can find a working sample here.

    Also, you can control the background color of the control through its Background property. You can further customize the control by changing its default ContentControl following the approach described here.

    I hope this info will help you. Please let us know if you need more.

    Greetings,
    Tina Stancheva
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top
DevCraft banner