Examining Various Silverlight Containers
page 1 of 8
Published: 14 May 2009
Unedited - Community Contributed
Abstract
This article looks at the various containers in Silverlight and examines how each container works. It also illustrates combining containers together to facilitate a container's needs and examines the various differences.
by Brian Mains
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 33066/ 147

User Controls

The core mechanism for displaying Silverlight pages is the UserControl class.  The UserControl element appears at the top of every user control.  This root element is a prime choice for storing static resources (discussed briefly later), as well as any namespaces (Silverlight uses namespaces to point to namespaces in an assembly).

The UserControl class is a content control, which means that it has only one property for storing children: Content.  This means only one root level element can appear underneath the UserControl class, excluding complex properties (like UserControl.Resources, where Resources is a collection-based property).

Fortunately, other controls can contain a collection of children, so the user control can host a single control, which that single control can then host multiple controls.  We'll get into the specifics of this soon.  The first control that appears at the top of the user control by default is discussed in the next section.


View Entire Article

User Comments

Title: Microsoft.Windows.Controls   
Name: Evgen
Date: 2010-08-26 4:42:38 AM
Comment:
May be
Microsoft.Windows.Controls
instead of
System.Windows.Controls
?
Title: Silverlight   
Name: Prabhakar
Date: 2009-07-15 7:51:36 AM
Comment:
This is article very useful. I have query "Can we add a xmal file inside any panel/etc.." I want to display all my xaml files/controls to display in one page. Please advice me if it is possible.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2017 ASPAlliance.com  |  Page Processed at 2017-03-24 2:00:37 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search