LEADTOOLS WebForms and AJAX (Leadtools.Web assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
PropertyChanged Event
See Also 
Leadtools.Web.Controls Namespace > WebThumbnailViewer Class : PropertyChanged Event



Notifies clients that a property value has changed.

Syntax

Visual Basic (Declaration) 
Public Event PropertyChanged As PropertyChangedEventHandler
Visual Basic (Usage)Copy Code
Dim instance As WebThumbnailViewer
Dim handler As PropertyChangedEventHandler
 
AddHandler instance.PropertyChanged, handler
C# 
public event PropertyChangedEventHandler PropertyChanged
C++/CLI 
public:
event PropertyChangedEventHandler^ PropertyChanged

Event Data

The event handler receives an argument of type PropertyChangedEventArgs containing data related to this event. The following PropertyChangedEventArgs properties provide information specific to this event.

PropertyDescription
PropertyName Gets the name of the property that changed.

Example

This example handles the PropertyChanged event.

Visual BasicCopy 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

      ' SelectedIndex property changed.

   ElseIf (e.PropertyName = "Rows") Then
      ' Rows property changed.

      '
      'etc.
      '
   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

The PropertyChanged event can indicate all properties on the object have changed by using either a null reference (Nothing in Visual Basic) or String.Empty as the property name in the System.ComponentModel.PropertyChangedEventArgs.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also