Looking at the style used in the theme

2 posts, 1 answers
  1. Rod
    Rod avatar
    71 posts
    Member since:
    Jan 2011

    Posted 21 Oct 2013 Link to this post

    I want to copy the linear gradient that I see used in one of the themes for the ListBox, for a border control. I've tried right-mouse button on the relevant control and I see "Edit Style" and then "Edit a Copy...". I've not done this before, and I'd hate to bring in all of the style into my XAML, so what does "Edit a Copy..." do?
  2. Answer
    Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 24 Oct 2013 Link to this post

    Hello Rod,

    All xaml files used to style our controls can be found on the following path:
    <RadControls_installation_dir>/Themes.Implicit/WPF40/<used theme> / Themes. In your case you can take a look at Telerik.Windows.Controls.xaml - the styles for RadListBox and RadListBoxItems are in this file, so you can get them and find the brush you need. After that you can find the brush and add it as a resource in your application.

    Another option is to use NoXaml dlls and merge the implicit styles in your project. You can find more information here. After that you will be able to use the brush (with its key) directly in your code, without defining it again.

    Hopefully this helps. Feel free to contact us in case you have any other problems or concerns.

    Rosen Vladimirov
    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 >>
  3. DevCraft banner
Back to Top