ColumnDefinitionCollection.Count Vlastnost

Definice

Získá celkový počet položek v rámci této instance .ColumnDefinitionCollection

public:
 property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer

Hodnota vlastnosti

Celkový počet položek v kolekci. Tato vlastnost nemá žádnou výchozí hodnotu.

Implementuje

Příklady

Následující příklad ukazuje, jak použít Count vlastnost.

private void colCount(object sender, RoutedEventArgs e)
{
    tp2.Text = "The current number of Columns is: " + grid1.ColumnDefinitions.Count;
}
Private Sub colCount(ByVal sender As Object, ByVal e As RoutedEventArgs)
    tp2.Text = "The current number of Columns is: " + grid1.ColumnDefinitions.Count.ToString()
End Sub

Kompletní ukázku si můžete prohlédnout v tématu Postupy: Manipulace se sloupci a řádky pomocí columnDefinitionsCollections a RowDefinitionsCollections.

Platí pro

Viz také