This is a migrated thread and some comments may be shown as answers.

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

5 Answers 75 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Lars Johansen
Top achievements
Rank 1
Lars Johansen asked on 27 Oct 2009, 01:12 PM
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

5 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 27 Oct 2009, 01:28 PM
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.
0
Lars Johansen
Top achievements
Rank 1
answered on 27 Oct 2009, 01:32 PM
Hi Valeri,

Yes I just figured that out :-)

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

Thanks !
/Lars
0
Valeri Hristov
Telerik team
answered on 27 Oct 2009, 01:45 PM
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.
0
Lars Johansen
Top achievements
Rank 1
answered on 27 Oct 2009, 02:22 PM
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
0
Valeri Hristov
Telerik team
answered on 28 Oct 2009, 07:32 AM
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.
Tags
ComboBox
Asked by
Lars Johansen
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Lars Johansen
Top achievements
Rank 1
Share this question
or