Copy style of a control and use it locally instead of using the theming mechanism.

6 posts, 0 answers
  1. Lars Johansen
    Lars Johansen avatar
    31 posts
    Member since:
    Oct 2009

    Posted 27 Oct 2009 Link to this post

    Hi,

    On the following help page is states that "You can also copy the style of a control to your application and use it locally, instead of relying on the theming mechanism." How exactly do I do that ?
    http://www.telerik.com/help/silverlight/extend-and-modify-builtin-themes.html

    Until now I have copied the style from the Theme for a single control to the app.xaml
    But how should I reference the style on my xaml page ?
    <Style TargetType="telerikInput:RadComboBox"> What else do I need ?

    /Lars
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 27 Oct 2009 Link to this post

    Hi Lars,

    You should set x:Name attribute on the Style and reference it with StaticResource:
    <Style x:Name="CustomStyle" TargetType="telerikInput:RadComboBox>
    ...
    </Style>
    ...
    <telerikInput:RadComboBox Style="{StaticResource CustomStyle}" />

    The easiest way is to open your page in Blend, select RadComboBox and from the Object menu select Edit Style -> Edit Copy. This will automatically copy and prepare all needed styles and templates.

    Regards,
    Valeri Hristov
    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. Lars Johansen
    Lars Johansen avatar
    31 posts
    Member since:
    Oct 2009

    Posted 27 Oct 2009 Link to this post

    Hi Valeri,

    Yes I just figured that out :-)

    I Known - have to invest in blend - my trial have run out :-(

    Thanks !
    /Lars
  4. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 27 Oct 2009 Link to this post

    I guess that VS 2010 will have the same abilities as Blend, regarding design-time, so it might be the better option :)

    Greetings,
    Valeri Hristov
    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.
  5. Lars Johansen
    Lars Johansen avatar
    31 posts
    Member since:
    Oct 2009

    Posted 27 Oct 2009 Link to this post

    Thanks - I already have SA to cover VS2010 :-)
    Are there any issues with RadControls and VS2010 ? I was considering the VS2010 Beta2.

    By the way - when I try to "Mark as answer" it just links me to the same page - but this time with no post on it - only the thread header text. ?? (Using firefox 3.5.3)

    /Lars
  6. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 28 Oct 2009 Link to this post

    I am afraid that our support for VS 2010 design time is not very good, but we will change that very soon after the Q3 2009 release next week.

    Regarding the "mark as answer" functionality - I forwarded your ticket to the web team, they said that they will fix the problem in the next update of the site, probably next week.

    Greetings,
    Valeri Hristov
    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.
Back to Top