PropertyChanged Event
Summary
Notifies clients that a property value has changed.
Syntax
public event PropertyChangedEventHandler PropertyChanged
Public Event PropertyChanged As PropertyChangedEventHandler
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.
Property | Description |
---|
PropertyName | Gets the name of the property that changed. |
Example
This example handles the PropertyChanged event.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Web.Controls;
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.
//
}
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Web.Controls
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Add-->
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Add-->
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Insert-->
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Insert-->
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.ThumbsDirection-->
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.ThumbsDirection-->
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Clear-->
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.Clear-->
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.GetThumbnailInfo-->
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.GetThumbnailInfo-->
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.PropertyChanged-->
''' <!--Leadtools.Web.Controls.WebThumbnailViewer.PropertyChanged-->
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