Templating Controls with Silverlight (Silverlight TV #36)

Download this episode

Download Video

Description

In this episode, Adam Kinney discusses how you can completely customize how a control looks and behaves. Adam explains how all Silverlight controls are lookless and that they can be customized using various templates depending on what you want to achieve. Instead of starting with a simple control like a TextBox, he demonstrates the power of templating using a ListBox and its various templates, including the ItemsPanel, ListBoxItem, Data Template, and more (we joke about the multiple names for some of the templates).

This is a great episode to watch if you ever wanted to know how to template controls, or even if you just want to know what all those templates are for and how to use them in Blend.


This also happens to be Adam's final episode as a Expression Evangelist with Microsoft. Be sure to watch just to see him as he shows us what he will be doing at his new job Smiley

<warning>This video contains a poor attempt at humor.</warning>

Relevant links:

Follow us on Twitter @SilverlightTV or on the web at http://silverlight.tv/ 



Registration for PDC10 is now open, and space is limited – don’t miss this opportunity to experience the PDC in Redmond. Join the PDC email newsletter for the latest information about PDC10 .

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      CKurt

      Good video!

       

      One question: The top control was still a ListBox, but why did you just not use a WrapPanel as top item ? Then you did not have to replace the StackPanel with a WrapPanel.

       

      It's hard to get the different templates if nobody ever told you, and even then it's still kind of hard and you still sometimes select the wrong one. (i do)

    • User profile image
      jv9

      The video is not really clear. But the presentation is really useful.

      Thanks.

    • User profile image
      g.breeze

      nice in/outro:)

    • User profile image
      myarrow

      Why so sad John? Adam is still your friend, isn't he?

      Nice video.

    • User profile image
      jopapa

      Yes, it was our poor attempt at geek humor Smiley wrapped around a solid topic.

       

       

    • User profile image
      ccatto

      Hey Now Silverlight TV #36,

       

      Great Vid!

       

      Thx 4 the info,

      Catto

    • User profile image
      krushu45

      There is a ton you can do with the listbox and the data/item template is key. I used JP's swivel behavior in this demo ...

      http://www.delvegraphics.com/DG-Swivel/TestPage.html

       

      you can see that i've used the data template in multiple ways... just flip the UI to see a custom data template drag and drop example.

       

      It's great for designers like myself.

    • User profile image
      jopapa

      Nice to see you using my swivel behavior. That's a nice sample of nested swivels ... and of a "tab" control too Smiley

       

      Yes, templates are very nice.

    • User profile image
      Ponnasai

      Hello its really nice video. Can u provide the sample code for it.Bcos i have the similar requirement for my project Need help for this image as i new to silverlight. i have done this similar kind in wpf using the listview. but i dint find the list view concept in silverlight. i have tried thru the listbox but i am not getting exact idea to show in similar kind of design. please help me in this regard. please check this link for the image http://twitpic.com/2fjp0b

      Thanks

      Sai 

    • User profile image
      Deactivated User

      Comment removed at user's request.

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.