GridTableStylesCollection.Clear GridTableStylesCollection.Clear GridTableStylesCollection.Clear GridTableStylesCollection.Clear Method

定義

清除集合。Clears the collection.

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

實作

範例

下列程式碼範例清除GridTableStylesCollection之前加入新DataGridTableStyleThe following code example clears the GridTableStylesCollection before adding a new DataGridTableStyle.

private:
   void ClearAndAdd()
   {
      GridTableStylesCollection^ gts = dataGrid1->TableStyles;
      gts->Clear();
   }
private void ClearAndAdd()
{
   GridTableStylesCollection gts = dataGrid1.TableStyles;
   gts.Clear();
}
Private Sub ClearAndAdd()
   Dim gts As GridTableStylesCollection = dataGrid1.TableStyles
   gts.Clear()
End Sub

適用於