Style Templates

10 posts, 1 answers
  1. Jed
    Jed avatar
    11 posts
    Member since:
    Jun 2008

    Posted 23 Jun 2008 Link to this post

    I apologize in advance for any ignorance concerning the matter as I am new to Silverlight and come from a background of CSS when it comes to styling. I surely don't expect Telerik to be responsible for teaching us how to apply styles to Telerik controls if the method for doing so is exactly the same as the built-in Silverlight controls; though, I can't ignore how helpful it would be.

    That being said, I'm having a frustrating time getting these RadControls for Silverlight 2 CTP to look the way we need them to look. My main difficulty here is knowing the structure inside the RadControls. As I understand it, to apply custom styles to a control, one has to understand what the control is composed of to declare the style of each individual component contained in the control. If I am wrong, please correct me. Under this assumption, however, I have used the .NET Reflector to read the ResourceDictionary XAML files from the Telerik.Windows.Controls.dll and used this ResourceDictionary as a reference for which style properties I can actively change to my liking. This only gave me a small piece of the picture though. I'm not sure if I'm going about this in the wrong way or if I'm just having a hard time with the learning curve here. I have examined the code on the Online Demos and haven't seen anything that really stuck out as a missing link.

    To be more specific, I was simply just trying to change the background color and opacity of the RadMenu control. I had no problems tinkering with the RadMenuItem control's background color and opacity, but the RadMenu control itself is where the problem was. I saw LinearGradientBrush tags defined in the ResourceDictionary with x:Key="MenuBackground" and tried to override these values without success. Is there something I don't know about? I'm sure there is.
  2. Answer
    Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 24 Jun 2008 Link to this post

    Hello Jed,

    First, I want to thank you for your feedback.

    Blend 2.5 June Preview doesn't support editing custom control templates so this is one major problem for all customers trying to reskin our controls. This will change with future version of Blend 2.5. At the moment we are thinking some workarounds like distributing a solution that include all of our skins. This way people will be able to edit all skins in Blend including controls States.

    In the attached file you can find application that use custom skins defined in separate file (MenuResources.xaml) and see what is the current way to skin our controls.
    Please keep in mind that this mechanism will probably change with the final version of our controls.

    If you have further questions, do not hesitate to contact me.

    Regards,
    Hristo
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
  4. Jed
    Jed avatar
    11 posts
    Member since:
    Jun 2008

    Posted 30 Jun 2008 Link to this post

    Thank you for the response. Unfortunately, we are forced to move on to the next stages of development at this time and I can't look into this styling stuff any more until a later phase of polishing our controls.
  5. Jaime
    Jaime avatar
    32 posts
    Member since:
    Sep 2008

    Posted 08 Jan 2009 Link to this post

    Hi!,

    Skinning and templating  is still impossible in the December Release using Blend.

    Any help on this?

    Best Regards.

  6. max
    max avatar
    9 posts
    Member since:
    Sep 2007

    Posted 09 Jan 2009 Link to this post

    Indeed, I'm trying to open TelerikThemingApplication in Blend with the December release installed and it doesn't work.  How can the Window and Menu be styled at present?  I only need to make simple changes to colours.  (It does open and compile in VS2008 though.)
  7. Nikolay
    Admin
    Nikolay avatar
    3997 posts

    Posted 09 Jan 2009 Link to this post

    Hello max,

    The project you referred to is obsolete and it does not run against the latest Blend edition. We will improve the theming mechanism so that it will not be needed to open one such project in order to customize the themes. For the time being, we can help you change the theme in the XAML. Could you please tell us what are the changes you would like to make so that we can send you sample code?

    Expecting your reply,
    Nick
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. max
    max avatar
    9 posts
    Member since:
    Sep 2007

    Posted 09 Jan 2009 Link to this post

    Thanks for your quick response.
    There are three things I'd like to change the colour of:
    1) The colour menu items go when the mouse is hovering over (i.e. 'Open' if the file menu is open and you're hovering over 'Open')
    2) The colour of the header of the currently open menu (i.e. 'File' if the file menu is open and you're hovering over 'Open')
    3) The two colours for the gradient fill of the currently open menu.
    Cheers,
    Max Christian

  9. max
    max avatar
    9 posts
    Member since:
    Sep 2007

    Posted 09 Jan 2009 Link to this post

    Thanks for your quick response.
    There are three things I'd like to change the colour of:
    1) The colour menu items go when the mouse is hovering over (i.e. 'Open' if the file menu is open and you're hovering over 'Open')
    2) The colour of the header of the currently open menu (i.e. 'File' if the file menu is open and you're hovering over 'Open')
    3) The two colours for the gradient fill of the currently open menu.
    Cheers,
    Max Christian

  10. Dan
    Dan avatar
    1 posts
    Member since:
    Jan 2009

    Posted 11 Jan 2009 Link to this post

    Is there a new version of this demo available?  I tried running it with the latest version of the controls and there were a number of XAML problems preventing it from running correctly.
  11. Hristo Deshev
    Admin
    Hristo Deshev avatar
    559 posts

    Posted 12 Jan 2009 Link to this post

    Hello Dan,

    The latest Silverlight release has been published on December 17, 2008. Are you using that build? Also, can you paste a log of the errors you are getting?

    Kind regards,
    Hristo Deshev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
DevCraft banner