DataGridColumnStyle.ConcedeFocus 方法

定义

通知列必须放弃它承载的控件的焦点。

protected public:
 virtual void ConcedeFocus();
protected internal virtual void ConcedeFocus ();
abstract member ConcedeFocus : unit -> unit
override this.ConcedeFocus : unit -> unit
Protected Friend Overridable Sub ConcedeFocus ()

示例

下面的代码示例使用 ConcedeFocus 方法隐藏 TextBox 托管的 DataGridTextBoxColumn

protected:
   virtual void ConcedeFocus() override
   {
      // Hide the TextBox when conceding focus.
      DataGridTextBoxColumn::TextBox->Visible = false;
   }
protected override void ConcedeFocus() {
    // Hide the TextBox when conceding focus.
    base.TextBox.Visible = false;
}
Protected Overrides Sub ConcedeFocus()
    ' Hide the TextBox when conceding focus.
    MyBase.TextBox.Visible = False
End Sub

注解

使用此方法可确定派生类中何时需要进一步的操作。 例如,此方法由 DataGridTextBoxColumn 重写以隐藏 DataGridTextBox

适用于