Grid Column and Row Collections
//File:Window.xaml.vb
Imports System
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Documents
Namespace columndefinitions_grid
Public Partial Class Window1
Inherits Window
Private rowDef1 As RowDefinition
Private colDef1 As ColumnDefinition
Private Sub colCount(sender As Object, e As RoutedEventArgs)
Console.WriteLine("The current number of Columns is: " + grid1.ColumnDefinitions.Count)
End Sub
End Class
End Namespace