DataGridViewCellStyle.ApplyStyle(DataGridViewCellStyle) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將指定的 DataGridViewCellStyle 應用於電流 DataGridViewCellStyle。
public:
virtual void ApplyStyle(System::Windows::Forms::DataGridViewCellStyle ^ dataGridViewCellStyle);
public virtual void ApplyStyle(System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle);
abstract member ApplyStyle : System.Windows.Forms.DataGridViewCellStyle -> unit
override this.ApplyStyle : System.Windows.Forms.DataGridViewCellStyle -> unit
Public Overridable Sub ApplyStyle (dataGridViewCellStyle As DataGridViewCellStyle)
參數
- dataGridViewCellStyle
- DataGridViewCellStyle
該 DataGridViewCellStyle 應用於當前 DataGridViewCellStyle的 。
例外狀況
dataGridViewCellStyle 是 null。
備註
該 ApplyStyle 方法將參數中設定 dataGridViewCellStyle 的屬性值應用於當前 DataGridViewCellStyle。 如果某屬性未設在 dataGridViewCellStyle,電流 DataGridViewCellStyle 會保留該屬性的值。
適用於
另請參閱
- DataGridView
- Windows Forms DataGridView 控制項中的儲存格樣式