IT tutorials
 
Mobile
 

Windows Phone 8 : Windows Phone Toolkit (part 6) - WrapPanel Layout Container

6/23/2013 7:57:12 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

11. WrapPanel Layout Container

The last XAML element included in the toolkit is a new layout container called the WrapPanel. This element is not a control but a layout container (for example, Grid, StackPanel). The purpose of the WrapPanel is to lay out elements left to right, and when they don’t fit horizontally, it wraps them onto a new line. For example, if you place nine buttons in a StackPanel like so:

<StackPanel>
  <Button Content="1" />
  <Button Content="2" />
  <Button Content="3" />
  <Button Content="4" />
  <Button Content="5" />
  <Button Content="6" />
  <Button Content="7" />
  <Button Content="8" />
  <Button Content="9" />
</StackPanel>

the StackPanel will simply stack them vertically, as shown in Figure 20.

Image

FIGURE 20 Buttons in a StackPanel

But if you change the XAML to replace the StackPanel with a WrapPanel, like so:

<toolkit:WrapPanel>
  <Button Content="1" />
  <Button Content="2" />
  <Button Content="3" />
  <Button Content="4" />
  <Button Content="5" />
  <Button Content="6" />
  <Button Content="7" />
  <Button Content="8" />
  <Button Content="9" />
</toolkit:WrapPanel>

the WrapPanel will stack the items horizontally and then wrap to a “new line” when the items no longer fit, as shown in Figure 21.

Image

FIGURE 21 Buttons in a WrapPanel

You can also change the Orientation attribute to Vertical to have the control stack vertically:

<toolkit:WrapPanel Orientation="Vertical">
  <Button Content="1" />
  <Button Content="2" />
  <Button Content="3" />
  <Button Content="4" />
  <Button Content="5" />
  <Button Content="6" />
  <Button Content="7" />
  <Button Content="8" />
  <Button Content="9" />
</toolkit:WrapPanel>

This is shown in Figure 22.

Image

FIGURE 22 Buttons in a vertical WrapPanel

 
Others
 
- Windows Phone 8 : Windows Phone Toolkit (part 5) - CustomMessageBox
- Windows Phone 8 : Windows Phone Toolkit (part 4) - ToggleSwitch Control, ExpanderView Control, PhoneTextBox Control
- Windows Phone 8 : Windows Phone Toolkit (part 3) - ListPicker Control, LongListSelector Control
- Windows Phone 8 : Windows Phone Toolkit (part 2) - ContextMenu Control, DatePicker and TimePicker Controls
- Windows Phone 8 : Windows Phone Toolkit (part 1) - AutoCompleteBox Control
- Android 3 : Employing Basic Widgets - Turn the Radio Up, It's Quite a View
- Android 3 : Employing Basic Widgets - Just Another Box to Check
- iTunes on Your iPad : Purchasing or Renting Music, Videos, Podcasts, and More
- iTunes on Your iPad : iTunes U – Great Educational Content, Searching iTunes
- iTunes on Your iPad : Finding Music with Featured, Top Charts, and Genius
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us