RowDefinitionCollection.Clear RowDefinitionCollection.Clear RowDefinitionCollection.Clear RowDefinitionCollection.Clear Method

定義

清除 RowDefinitionCollection 的內容。Clears the content of the RowDefinitionCollection.

public:
 virtual void Clear();
public void Clear ();
abstract member Clear : unit -> unit
override this.Clear : unit -> unit
Public Sub Clear ()

實作

範例

下列範例示範如何使用Clear方法來清除的內容。 RowDefinitionCollectionThe following example demonstrates how to use the Clear method to clear the content of a RowDefinitionCollection.

private void clearRow(object sender, RoutedEventArgs e)
{
    grid1.RowDefinitions.Clear();
}
Private Sub clearRow(ByVal sender As Object, ByVal e As RoutedEventArgs)
    grid1.RowDefinitions.Clear()
End Sub

若要查看完整的範例, 請參閱如何:使用 ColumnDefinitionsCollections 和 Rowdefinitionscollections 管理資料運算元據行和資料列。To view the complete sample, see How to: Manipulate Columns and Rows by Using ColumnDefinitionsCollections and RowDefinitionsCollections.

適用於

另請參閱