Editing Telerik's Silverlight Controls in Expression Blend

Thursday, September 04, 2008 by Kiril Stanoev | Comments 7
 

Along with the release of Telerik RadControls for Silverlight Beta 2, we also released a "blendable" Silverlight project. What I mean under "blendable" is that when this project is opened in Expression Blend, it allows you an easy and straightforward approach to editing the style of every control in out suite.

To begin with, go to your Client.net account and download Telerik.Windows.Controls.Blend.

Unzip the project anywhere and open the Telerik.Windows.Controls.Blend.sln files using Expression Blend.

If you explore the Project tab, you will find that each control is represented by a separate XAML file.

Open, for example, the Expander.xaml file. You will see that there is nothing more than an Expander control on the page. If you want to edit the ControlTemplate of the control, simply right-click the control and choose "Edit Control Parts(Template) > Edit Template"

After that Blend will show you all the elements that compose the ControlTemplate of the Expander control.

I am not much of a designer so I will leave the rest to your imagination.

The same instructions are fully applicable to the rest of the controls in the project. All the xaml that a single control uses is placed inside the resources of the respective host page. This means that if you want to edit the ControlTemplate of the TreeView you can find its xaml inside the UserControl.Resources tag in TreeView.xaml.

Posted in: Blend

7 Comments

  • Ben Hayat 05 Sep
    Good enough! Now let's take it one step further. Let's suppose I've changed the ControlTemplate of the RADTreeView and now I want to use this NEW one thought my project(s). What's the next step that any altered control can then be used from IDE (Blend/VS)? Thanks! ..Ben
  • Kiril Stanoev 06 Sep
    Hi Ben, I am not sure that I fully understand your question. Could you please explain in more details what you mean. It would be great if you could provide a sample scenario for the question. Thanks for the question. Regards, Kiril
  • Ben Hayat 07 Sep
    Hi Kiril; I was simply asking, when a developer changes/overwrites the Control template of one of your components, how is that new template used application wide? Another words, would you store the new template in App.Xaml and then every time I drop a new instance of RADTreeView on a form, I need to reference the TreeView to my Template to overwrite yours? That's what I was asking, for you to explain, how a new template is then used thought a project. Hope it's more clear this time! ..Ben
  • Kiril Stanoev 07 Sep
    Hi Ben, You're right that the best approach to use a modified ControlTemplate application wide, is to store this ControlTemplate in the App.xaml. Also is true that if you want to use a ControlTemplate different than the default one, you need to make each control reference it. So far, there is no other mechanism, but if you have another approach in mind, I'd be glad if you share it. Hope that helps. Regards, Kiril
  • Tim 02 Oct
    Hi, When I try to edit the template for a treeviewitem in Expression Blend, I just get an empty ControlTemplate. Is it possible to retrieve the entire default control template for the treeview items? So we can start editing the specific items in that template. (Like on MSDN, you'll find a default control template for e.g. a listboxitem.) Regards, Tim
  • Serrin 07 Nov
    Just curious, I don't see the Blend file anywhere in the new install or available downloads... Any chance you'll be throwing up a new one for the new release? :)
  • Jaime Bula 08 Nov
    Same question here... any new release?

Add comment

  1. Formatting options
       
     
     
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)