//File:Window.xaml.vb Imports System Imports System.Windows Imports System.Windows.Controls Namespace grid_getset_methods Public Partial Class Window1 Inherits Window Private Sub setCol0(sender As Object, e As RoutedEventArgs) Grid.SetColumn(rect1, 0) Console.WriteLine("Column " & Grid.GetColumn(rect1).ToString()) End Sub Private Sub setCol1(sender As Object, e As RoutedEventArgs) Grid.SetColumn(rect1, 1) Console.WriteLine("Column " & Grid.GetColumn(rect1).ToString()) End Sub Private Sub setCol2(sender As Object, e As RoutedEventArgs) Grid.SetColumn(rect1, 2) Console.WriteLine("Column " & Grid.GetColumn(rect1).ToString()) End Sub Private Sub setRow0(sender As Object, e As RoutedEventArgs) Grid.SetRow(rect1, 0) Console.WriteLine("Row " & Grid.GetRow(rect1).ToString()) End Sub Private Sub setRow1(sender As Object, e As RoutedEventArgs) Grid.SetRow(rect1, 1) Console.WriteLine("Row " & Grid.GetRow(rect1).ToString()) End Sub Private Sub setRow2(sender As Object, e As RoutedEventArgs) Grid.SetRow(rect1, 2) Console.WriteLine("Row " & Grid.GetRow(rect1).ToString()) End Sub Private Sub setColspan(sender As Object, e As RoutedEventArgs) Grid.SetColumnSpan(rect1, 3) Console.WriteLine("ColumnSpan " & Grid.GetColumnSpan(rect1).ToString()) End Sub Private Sub setRowspan(sender As Object, e As RoutedEventArgs) Grid.SetRowSpan(rect1, 3) Console.WriteLine("RowSpan " & Grid.GetRowSpan(rect1).ToString()) End Sub Private Sub clearAll(sender As Object, e As RoutedEventArgs) Grid.SetColumn(rect1, 0) Grid.SetRow(rect1, 0) Grid.SetColumnSpan(rect1, 1) Grid.SetRowSpan(rect1, 1) End Sub End Class End Namespace