Style RadComboBox to look like default Silverlight ComboBox

5 posts, 1 answers
  1. Stacey Haslag
    Stacey Haslag avatar
    30 posts
    Member since:
    Oct 2009

    Posted 01 Dec 2010 Link to this post

    We have recently purchased your Silverlight controls. We were previously using the default Silverlight ComboBox, and would like to start replacing this with your RadComboBox control. However, we don't want the style to change so drastically. We would like to have your RadComboBox look like the default Silverlight ComboBox control.

    At this time, I do not have Blend 4, so I cannot edit the template myself using this. And I don't want to have to write the xaml by hand.

    Do you guys have a style you can provide that will style your RadComboBox to look a lot more like the default Silverlight ComboBox? We specifically wnat to get rid of the radiant gray background for the "selected item"; and remove the orange border when the control has focus.

    Thanks for your help!
    Stacey
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 02 Dec 2010 Link to this post

    Hi Stacey Haslag,

    Thank you for your interest in RadControls.

    RadControls for SIlverlight ship together with 8 themes  that you can use or that you can customize to your own liking. Please, find attached a project I preprared for you - it contains our RadComboBox with a copy of its styles for the Vista theme. I belive our Vista theme is closest to the appearance you are after.

    I intentionally included and merged all needed styles in RadComboBox_VistaTheme.xaml - in case you wish to take the project further and customize RadComboBox to look exactly the same as the regular ComboBox.
    In such case,  I suggest you install the trial version of Expression Blend 4, even if it is just for the purposes of this customization because the modification of brushes is a lengthy process.
    It is related to customizing the ButtonChrome control which is the inner part of RadComboBox (I inluded the ButtonChromeStyle in the attached project). There are numerous brushes and if you choose to modify them by hand, the process will take up an unnecessarily great amount of time , if you do not have Blend installed.

    Furthermore, if you wish to browse through the other possible themes  you can use, please visit our online examples related to RadComboBox.



    Greetings,
    Dani
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. DevCraft banner
  4. Stacey Haslag
    Stacey Haslag avatar
    30 posts
    Member since:
    Oct 2009

    Posted 02 Dec 2010 Link to this post

    Thanks for your examples. The Vista Theme is closer to the look we want; not completely there, but a lot closer. If we want to just take the Vista theme look and only change the radiant background of the "selected" item, is that just a matter of changing one "section" of the style?

    Also, I can run your project just fine. But when I copy the RadComboBox_VistaTheme.xaml file into my project, I get this error message:
    Error 762 The type 'telerikPrimitives:Popup' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. 

    I tried looking around for a reference to this, but had no luck. I also compared the list of references between your project and my project, and saw nothing missing from my solution. Do you know what else I have to do in order to use this .xaml file in my project?
  5. Answer
    Dani
    Admin
    Dani avatar
    848 posts

    Posted 07 Dec 2010 Link to this post

    Hi Stacey,

    In order to change the selected item background, you need to change only that part of the ButtonChromeStyle that is responsible for the "Selected" state. When you open the project I sent you in Blend, go to the Resources tab (attached a screenshot) and find all brushes available for the ButtonChrome. See attached combostyles.png for reference as to what brushes you need to change to affect the pressed , higlighted or focused state of the ButtonChrome.

    Secondly, you should have no problem copying the RadComboBox_VistaTheme.xaml file into your project. The Primitives namespace is part of the Telerik.Windows.Controls assembly. Please, verify you have the latest assemblies and that you do have a reference to Telerik.Windows.Controls. Be sure to clean and rebuild the project. If you are still experiencing the problem, please send a sample project reproducing it, so that we can help you.

    Greetings,
    Dani
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  6. Stacey Haslag
    Stacey Haslag avatar
    30 posts
    Member since:
    Oct 2009

    Posted 08 Dec 2010 Link to this post

    I did have some references to the oldver version of  Telrik DLL's in some of my projects. I refreshed those DLL's to the newest version, and things seem to be working for me now. Thanks a lot for your help!
Back to Top
DevCraft banner