Notifies clients that a property value has changed.
Syntax
Example
This example handles the PropertyChanged event.
Visual Basic | Copy Code |
---|
Public Sub WebImageViewer_PropertyChanged(ByVal webThumbnailViewer As WebThumbnailViewer)
AddHandler webThumbnailViewer.PropertyChanged, New System.ComponentModel.PropertyChangedEventHandler(AddressOf webThumbnailViewer_PropertyChanged)
End Sub
Sub webThumbnailViewer_PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs)
If (e.PropertyName = "SelectedIndex") Then
ElseIf (e.PropertyName = "Rows") Then
End If
End Sub |
C# | Copy Code |
---|
public void WebImageViewer_PropertyChanged(WebThumbnailViewer webThumbnailViewer) { webThumbnailViewer.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(webThumbnailViewer_PropertyChanged); } void webThumbnailViewer_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if(e.PropertyName == "SelectedIndex") { // SelectedIndex property changed. } else if(e.PropertyName == "Rows") { // Rows property changed. } // //etc. // } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also