Page view counter

Jesse Liberty - Silverlight Geek

More Signal Less Noise

Creating Custom Controls – A Common Starter Application

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.

Comments

samcov said:

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

# September 21, 2008 2:35 PM

Maciek said:

/gets popcorn

# September 21, 2008 7:13 PM

jesseliberty said:

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

# September 21, 2008 10:34 PM

samcov said:

Tanks!

# September 22, 2008 12:00 AM

Pers??nliche Controls - Zusammenfassung at Blog von J??rgen Ebner said:

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

# September 22, 2008 3:07 AM

Dew Drop - September 22, 2008 | Alvin Ashcraft's Morning Dew said:

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

# September 22, 2008 8:29 AM

Community Blogs said:

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

# September 23, 2008 2:03 AM

2008 September 23 - Links for today « My (almost) Daily Links said:

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

# September 23, 2008 7:37 AM

Mirrored Blogs said:

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

# September 27, 2008 1:26 PM

Microsoft Weblogs said:

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

# September 27, 2008 1:58 PM

More Signal said:

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

# September 30, 2008 2:47 PM

Jesse Liberty - Silverlight Geek said:

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

# October 9, 2008 9:48 AM

Microsoft Weblogs said:

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

# October 9, 2008 10:10 AM

Mirrored Blogs said:

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

# October 9, 2008 10:38 AM

Custom Controls - the handling at Blog von J??rgen Ebner said:

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

# October 10, 2008 6:15 AM

Jesse Liberty - Silverlight Geek said:

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

# October 23, 2008 11:21 AM

Microsoft Weblogs said:

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

# October 23, 2008 11:51 AM

Silverlight Tipps vom Insider said:

Pingback from  Silverlight Tipps vom Insider

# October 24, 2008 5:08 AM