Page view counter

Creating Custom Controls – A Common Starter Application

Follow up posted at bottom of article

It will be helpful as we explore custom controls to have a common starting project. You may  remember from my posting on the 12th that I laid out a structure with three projects in one solution, with 5 important files.

  1. In the ClassLibrary, customcontrol.cs  which defines the logic and methods as well as the attributes of the custom control. The attributes define the contract, and are what make the control skinnable with the assistance of tools like Blend
  2. Also in the ClassLibrary is a file that must be named generic.xaml that defines the default look for your custom control (in xaml).
  3. In your application there are three files (as usual) that do the heavy lifting: Page.xaml, Page.xaml.cs and App.xaml.  They do their normal jobs. That is: Page.xaml makes an instance of the control and may or may not include a Template statement asking for a Template in Page.xaml or (more likely) in App.xaml to override the default look and feel
  4. Page.xaml.cs contains the logic of the application (not of the control) just as it always does
  5. App.xaml may have a template for your new Custom control just as it may have a template for button or checkbox.

I've created a starter application with corresponding files and placed it here  The starter application just lays out the structure of the program and will be used for three inter-related purposes

1. An intensive tutorial (expected publication date approximately 10/13
2. A set of video I'll be developing in the next week or two
3. Blog entries exploring what I hope will be interesting topics in depth

Following the suggestions received here, the tutorial should be pretty intensive, while the blog and videos will assume a more intermediate level of knowledge.  If this topic (templatable custom controls) is of interest, you'll want to start by reviewing some or all of these:

Blog entries

Tutorial

Videos

Thanks.

 

Follow Link for Related Article


More Skinnable Custom Controls – Change to generic.xaml

Published 21 September 2008 08:54 AM by jesseliberty

Comments

# samcov said on 21 September, 2008 02:35 PM

Jesse, your link to the "starter application with corresponding files" is broken.

# Maciek said on 21 September, 2008 07:13 PM

/gets popcorn

# jesseliberty said on 21 September, 2008 10:34 PM

the link is fixed, with my apologies; I thought I had tested it.  In any case, it is working now. Tested from three machines.

-j

# samcov said on 22 September, 2008 12:00 AM

Tanks!

# Pers??nliche Controls - Zusammenfassung at Blog von J??rgen Ebner said on 22 September, 2008 03:07 AM

Pingback from  Pers??nliche Controls - Zusammenfassung at Blog von J??rgen Ebner

# Dew Drop - September 22, 2008 | Alvin Ashcraft's Morning Dew said on 22 September, 2008 08:29 AM

Pingback from  Dew Drop - September 22, 2008 | Alvin Ashcraft's Morning Dew

# Community Blogs said on 23 September, 2008 02:03 AM

Rob Houweling with a Jeff Paries Sneak Preview, Devin Rose with "Mountain Pass Tower Defense"

# 2008 September 23 - Links for today « My (almost) Daily Links said on 23 September, 2008 07:37 AM

Pingback from  2008 September 23 - Links for today « My (almost) Daily Links

# Mirrored Blogs said on 27 September, 2008 01:26 PM

This is the first in a series of explorations of breaking changes in the Release Candidate for Silverlight

# Microsoft Weblogs said on 27 September, 2008 01:58 PM

This is the first in a series of explorations of breaking changes in the Release Candidate for Silverlight

# More Signal said on 30 September, 2008 02:47 PM

This is the first in a series of explorations of breaking changes in the Release Candidate for Silverlight

# Jesse Liberty - Silverlight Geek said on 09 October, 2008 09:48 AM

Over the past month I've posted half a dozen min-articles about creating custom controls that can interact

# Microsoft Weblogs said on 09 October, 2008 10:10 AM

Over the past month I've posted half a dozen min-articles about creating custom controls that can interact

# Mirrored Blogs said on 09 October, 2008 10:38 AM

Over the past month I've posted half a dozen min-articles about creating custom controls that can

# Custom Controls - the handling at Blog von J??rgen Ebner said on 10 October, 2008 06:15 AM

Pingback from  Custom Controls - the handling at Blog von J??rgen Ebner

# Jesse Liberty - Silverlight Geek said on 23 October, 2008 11:21 AM

We have, I think, officially passed the point where anyone can keep up with the new technology available

# Microsoft Weblogs said on 23 October, 2008 11:51 AM

We have, I think, officially passed the point where anyone can keep up with the new technology available

# Silverlight Tipps vom Insider said on 24 October, 2008 05:08 AM

Pingback from  Silverlight Tipps vom Insider

# Jesse Liberty - Silverlight Geek said on 05 December, 2008 03:01 PM

    I have completed the four part video series Creating Skinnable Customer Controls and I

# Microsoft Weblogs said on 05 December, 2008 03:52 PM

    I have completed the four part video series Creating Skinnable Customer Controls and I

# Erstellen von anpassbaren Custom Control at Programming with Silverlight, WPF & .NET said on 08 December, 2008 04:07 PM

Pingback from  Erstellen von anpassbaren Custom Control at Programming with Silverlight, WPF & .NET

# Jesse Liberty - Silverlight Geek said on 22 December, 2008 05:34 PM

When we started creating How Do I videos, the idea was to have stand alone videos that do not depend

# Microsoft Weblogs said on 22 December, 2008 06:17 PM

When we started creating How Do I videos, the idea was to have stand alone videos that do not depend

# Templates & Custum Controls at Programming with Silverlight, WPF & .NET said on 23 December, 2008 08:30 AM

Pingback from  Templates & Custum Controls at Programming with Silverlight, WPF & .NET

# Templates & Custum Controls at Programming with Silverlight, WPF & .NET said on 23 December, 2008 08:32 AM

Pingback from  Templates & Custum Controls at Programming with Silverlight, WPF & .NET

# Digging Into Custom Controls - Jesse Liberty - Silverlight Geek said on 31 December, 2008 04:14 PM

Pingback from  Digging Into Custom Controls - Jesse Liberty - Silverlight Geek

# Jesse Liberty - Silverlight Geek said on 29 May, 2009 04:57 PM

    I had the pleasure of presenting What’s New In Silverlight 3 both at TechEd this year and

# Microsoft Weblogs said on 29 May, 2009 05:42 PM

I had the pleasure of presenting What’s New In Silverlight 3 both at TechEd this year and then again

# Programming with Silverlight, WPF & .NET » Was ist neu in Silverlight 3 said on 05 June, 2009 06:26 AM

Pingback from  Programming with Silverlight, WPF & .NET » Was ist neu in Silverlight 3

# Top-silverlight » Blog Archive » What???s New In Silverlight 3 said on 06 June, 2009 07:46 AM

Pingback from  Top-silverlight  » Blog Archive   » What???s New In Silverlight 3