Search This Blog

Loading...

Oct 6, 2011

Tutorial Silverlight: What is Panels in Silverlight - Day3


Sponsored Links:
Previous Topic

Panel is the container of your objects in Silverlight. Silverlight has 6 types of panels as below
  • Grid Layout panel
  • Canvas
  • Stack Panel
  • ScrollViewer
  • Border and
  • ViewBox
Each panel has their importance as per the requirement.
Grid Layout panel: is the default panel. It is used to display data in tabular form.


Canvas panel:  This panel is used to display your content anywhere inside the user control. It is similar to "
tag". Here you can define the absolute position(Left/Top) of your content.


Stack panel: This panel is come into picture when you want to display your content either Horizontal or Vertical. In other words you can set the orientation of your content by using this property.


Scroll Viewer: Scroll Viewer panel has very limited scope, you can use this panel to show the content of ListBox, TextBox etc. You can set the scrollable functionality of your objects.


Border View: As name suggest, we can use this panel, if wanted to show some panel in our Silverlight appication. It doesn't contain multiple contents inside the Border View panel.


ViewBox: It help us to stretch our controls inside the Silverlight application. It has one property called "stretch" which help us to stretch our controls. However you can not contain multiple contents inside the ViewBox. You can have only one child.

Follow by Email