Control.BindingContextChanged Evento
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Ocorre quando o valor da BindingContext propriedade muda.
public:
event EventHandler ^ BindingContextChanged;
public event EventHandler BindingContextChanged;
member this.BindingContextChanged : EventHandler
Public Custom Event BindingContextChanged As EventHandler
Tipo de Evento
Exemplos
O seguinte exemplo de código adiciona um EventHandler delegado ao BindingContextChanged evento de um TextBox controlo.
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
Observações
Para adicionar um novo BindingContext ao Control atravessar a BindingContext propriedade, consulte o BindingContext construtor.
Este evento é ativado se a BindingContext propriedade alterada for alterada por uma modificação programática ou por interação do utilizador.
Para obter mais informações sobre como manipular eventos, consulte Manipulando e gerando eventos.