Control.BindingContextChanged Control.BindingContextChanged Control.BindingContextChanged Control.BindingContextChanged Event

Definição

Ocorre quando o valor da propriedade BindingContext muda.Occurs when the value of the BindingContext property changes.

public:
 event EventHandler ^ BindingContextChanged;
public event EventHandler BindingContextChanged;
member this.BindingContextChanged : EventHandler 
Public Custom Event BindingContextChanged As EventHandler 

Exemplos

O exemplo de código a seguir EventHandler adiciona um delegado BindingContextChanged ao evento de TextBox um controle.The following code example adds an EventHandler delegate to the BindingContextChanged event of a TextBox control.

private:
   void AddEventHandler()
   {
      textBox1->BindingContextChanged += gcnew EventHandler(
         this, &Form1::BindingContext_Changed );
   }

   void BindingContext_Changed( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      Console::WriteLine( "BindingContext changed" );
   }
private void AddEventHandler()
{
   textBox1.BindingContextChanged += new EventHandler(BindingContext_Changed);
}

private void BindingContext_Changed(object sender, EventArgs e)
{
   Console.WriteLine("BindingContext changed");
}
Private Sub AddEventHandler()
    AddHandler textBox1.BindingContextChanged, _
       AddressOf BindingContext_Changed
End Sub    
   
Private Sub BindingContext_Changed(sender As Object, e As EventArgs)
    Console.WriteLine("BindingContext changed")
End Sub

Comentários

Para adicionar um novo BindingContext Control ao através da BindingContext Propriedade, consulte o BindingContext Construtor.To add a new BindingContext to the Control through the BindingContext property, see the BindingContext constructor.

Esse evento será gerado se a BindingContext propriedade for alterada for alterada por uma modificação programática ou interação do usuário.This event is raised if the BindingContext property is changed is changed by either a programmatic modification or user interaction.

Para obter mais informações sobre como manipular eventos, consulte manipulando e gerando eventos.For more information about handling events, see Handling and Raising Events.

Aplica-se a

Veja também