DataGridColumnStyle.Width 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定欄位的寬度。
public:
virtual property int Width { int get(); void set(int value); };
public virtual int Width { get; set; }
member this.Width : int with get, set
Public Overridable Property Width As Integer
屬性值
欄位寬度,以像素為單位。
範例
以下程式碼範例將 a DataGridColumnStyle 的寬度設定為新值。
Private Sub SetWidth()
Dim dgc As DataGridColumnStyle
dgc = DataGrid1.TableStyles(0).GridColumnStyles("id")
dgc.Width = 500
End Sub