The WPF and Silverlight platforms have a wide selection of powerful layout controls. This topic will provide you with an understanding of these layout controls and how to take advantage of the WPF and Silverlight Designer features when working with these controls. In this topic when the term pixel is used, it refers to a device-independent-pixel. In WPF a pixel is 1/96 of an inch. This MSDN topic covers device-independent-pixels. http://msdn.microsoft.com/en-us/library/bb847924.aspx
Table of Contents
- Layout Control Types
- Panel Selection
- Panels
- Grid
- StackPanel
- Canvas
- DockPanel
- WrapPanel
- UniformGrid
- Panel.ZIndex
- Decorators
- Border
- Content Controls
- Window
- UserControl
- GroupBox
- Expander
- TabItem
- Items Controls
- TabControl
- Layout Properties
- Comments
Layout Control Types
WPF layout controls can be logically grouped by base types that determine their behavior.
- Panels
- Provide arrangement of their child objects.
- Derive directly or indirectly from Panel.
- Have a Children property that is a collection of their child objects.
- Example controls are the Grid, StackPanel, Canvas, DockPanel WrapPanel and UniformGrid.
- Decorators
- Apply effects to their single child object.
- Derive from Decorator.
- Have a Child property that contains their single child object.
- Example controls are the Border and ViewBox
- Content Controls
- Contain a single object of any type.
- Derive directly or indirectly from ContentControl.
- Have a Content property that contains their single object.
- Example controls are the Window, UserControl, GroupBox, TabItem, Expander, HeaderedContentControl and ContentControl.
- Items Controls
- Used to present a collection of objects.
- Derive directly or indirectly from ItemsControl.
- Have two ways of being populated
- Objects can be added to the Items property in code behind or in XAML.
- A list of objects can be bound to the ItemsSource property.
- When objects are added using either of the two above methods, UI objects will be automatically generated. The generated UI objects can be customized through the use of DataTemplates.
- Example controls are the ListBox, ListView, DataGrid, TabControl, ComboBox, Menu and ItemsControl.
- See for the further details...
No comments:
Post a Comment