Silverlight stackpanel with one TextBlock and four buttons example

The StackPanel is one of the simplest layout containers. It simply stacks its children in a single row or column. These elements are arranged based on their order.

<UserControl x: Class="Layout.ExStack" 
 xmlns="http: //schemas. microsoft. com/winfx/2006/xaml/presentation" 
 xmlns: x="http: //schemas. microsoft. com/winfx/2006/xaml"> 
  <StackPanel Background="White"> 
    <TextBlock Text=" A Button in Stackpanel"></TextBlock> 
    <Button Content=" Button 1"></Button> 
    <Button Content=" Button 2"></Button> 
    <Button Content=" Button 3"></Button> 
    <Button Content=" Button 4"></Button> 

Enjoyed this post? Share it!


Leave a comment

Your email address will not be published.