150 likes | 244 Views
Working with Silverlight Controls. Mahender Sarangam Having close to 5 years of experience. Working as a Senior Software Engineer in United Health Group . Good Knowledge on C#, ASP.NET, Silverlight, WPF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology.
E N D
Mahender Sarangam Having close to 5 years of experience. Working as a Senior Software Engineer in United Health Group. Good Knowledge on C#, ASP.NET, Silverlight, WPF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology.
Silverlight Layout Controls • Silverlight window can hold only a single element. • To fit in more than one element, we create a container in Silverlight window and then add other elements to that container • All SilverLight controls inherits from System.Windows.Controls.Panel class
Stack Panel • Places elements in a horizontal or vertical stack. • This layout container is typically used for small sections of a larger, more complex page. • The Stack Panel is one of the simplest layout containers • Orientation=“Horizontal/Vertical”
WrapPanel:Places elements in a series of wrapped lines. In horizontal orientation, the WrapPanel lays items out in a row from left to right and then onto subsequent lines. In vertical orientation, the WrapPanel lays out items in a top-to- bottomcolumnand then uses additional columns to fit the remaining items. Thislayout container is available in the Silverlight Tookit. • DockPanel : Aligns elements against an entire edge of the container. This layout container is available in the Silverlight Tookit. • Grid Arranges elements in rows and columns according to an invisible table. This isoneof the most flexible and commonly used layout containers. • Canvas Allows elements to be positioned absolutely using
Wrap Panel • The Wrap Panel lays out controls in the available space, one line or column at a time. • By default, the WrapPanel.Orientation property is set to Horizontal; controls are arranged from left to right and then on subsequent rows.
Dock Panel • The Silverlight Toolkit also includes a layout container called the Dock Panel. • For Example:
Grid Layout • It acts like a table in HTML but there are many differences in the markup representation • The Grid is the most powerful layout container in Silverlight. • It’s the default root layout element for all the UserControl and Page templates, and is the one control that allows you to easily resize (not rescale) content to take up the space available to the plug-in • RowDefinitions collection stores the definitions of the rows of a Grid and the Grid also enables to create a ColumnDefinition element. This element must be defined within the ColumnDefinitionscollection