Partager via


DataGridColumnStyle.WidthChanged Événement

Définition

Se produit quand la valeur de la propriété Width change.

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

Type d'événement

EventHandler

Exemples

L’exemple de code suivant illustre l’utilisation de ce membre.

// Add the 'Customer ID' column style.
DataGridColumnStyle^ myIDCol = gcnew DataGridTextBoxColumn;
myIDCol->MappingName = "custID";
myIDCol->HeaderText = "Customer ID";
myIDCol->Width = 100;
myIDCol->WidthChanged += gcnew EventHandler( this, &MyForm::MyIDColumnWidthChanged );
myDataGridTableStyle->GridColumnStyles->Add( myIDCol );
// Add the 'Customer ID' column style.
DataGridColumnStyle myIDCol = new DataGridTextBoxColumn();
myIDCol.MappingName = "custID";
myIDCol.HeaderText = "Customer ID";
myIDCol.Width = 100;
myIDCol.WidthChanged += new EventHandler(MyIDColumnWidthChanged);
myDataGridTableStyle.GridColumnStyles.Add(myIDCol);
' Add the 'Customer ID' column style.
Dim myIDCol As DataGridTextBoxColumn = New DataGridTextBoxColumn()
myIDCol.MappingName = "custID"
myIDCol.HeaderText = "Customer ID"
myIDCol.Width = 100
AddHandler myIDCol.WidthChanged, AddressOf MyIDColumnWidthChanged
myDataGridTableStyle.GridColumnStyles.Add(myIDCol)

S’applique à