Creating rows and columns in grid using XAML

Creating new columns and rows is done using the ColumnDefinitions and RowDefintions properties on a grid. This allows you to specify that individual elements are in a particular row or column using the attached property.

<UserControl x:Class="silverlight.Sample"
      <ColumnDefinition />
      <ColumnDefinition />
    <TextBlock Text="Hello" Grid.Column="1" />

Enjoyed this post? Share it!


Leave a comment

Your email address will not be published.