Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Buttons > Custom Button Theming

Not answered Custom Button Theming

Feed from this thread
  • Yuri avatar

    Posted on Apr 18, 2012 (permalink)

    Hi There, 

    We have a requirement for lots of different buttons with their appropriate look and feel. I have created my own Theme where the buttons would each take on their own style, The required behavior would be to have our own style for each of the buttons, however, if one of your themes were chosen, then it would just use that for each Button Style,

    The buttons all inherit from RadButton, However, When we use our own Theme, the buttons look the way they should in design time. eg ButtonType1 =  Green, ButtonType2 = Red, NormalRadButton = Orange. However, when I then run the application all the buttons change to the NormalRadButton of Orange. This would be the required behavior when using a Telerik theme.

    I have a small demo app that shows the behavior, however, you don't seem to allow these type of uploads, I have attached screen shots of the demo app, 

    I could send you the demo app if required

    Thanks,

    Yuri

     
    Attached files

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Apr 20, 2012 (permalink)

    Hi Yuri,

    Thank you for sending us a support ticket with a sample solution. It really helped us better understand the case.

    I already posted a reply in the support thread, however, in case anyone else encounters the same issue, I will post the information here as well.

    At the moment in order to create an implicit style based on a custom theme, you need to use the following syntax:
    <Style BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=MyTheme:MyCustomTheme, ElementType=telerik:RadButton}}" TargetType="telerik:RadButton" />
     
    <Style BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=MyTheme:MyCustomTheme, ElementType=CustomControlLibrary:FirstLevelButton}}" TargetType="CustomControlLibrary:FirstLevelButton" />

    Please give this a try and let us know if it helps.

    Kind regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Buttons > Custom Button Theming