←Select platform

PropertyChanged Event

Summary

Notifies clients that a property value has changed.

Syntax

C#
VB
C++
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.

PropertyDescription
PropertyName Gets the name of the property that changed.
Remarks

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

Example

This example handles the PropertyChanged event.

C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Web.Controls; 
using Leadtools.ImageProcessing; 
 
public void WebImageViewer_PropertyChanged() 
{ 
   WebImageViewer mainWebImageViewer = new WebImageViewer(); 
   mainWebImageViewer.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(mainWebImageViewer_PropertyChanged); 
   // 
   // update some properties values 
   // 
   mainWebImageViewer.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(mainWebImageViewer_PropertyChanged); 
} 
 
void mainWebImageViewer_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) 
{ 
   if (e.PropertyName == "ScaleFactor") 
   { 
      // ScaleFactor property changed. 
   } 
   else if (e.PropertyName == "SizeMode") 
   { 
      // SizeMode property changed. 
   } 
   // 
   //etc. 
   // 
} 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.ImageProcessing 
Imports Leadtools.Web.Controls 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.OpenImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.OpenImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ScrollBarVisible--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ScrollBarVisible--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ApplyCommand--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ApplyCommand--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.PropertyChanged--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.PropertyChanged--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.AddWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.AddWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.InsertWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.InsertWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.EnsureVisible--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.EnsureVisible--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.GetThumbnailImageByText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.GetThumbnailImageByText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.SetThumbnailText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.SetThumbnailText--> 
 
Public Sub WebImageViewer_PropertyChanged() 
 
   Dim mainWebImageViewer As WebImageViewer = New WebImageViewer() 
   AddHandler mainWebImageViewer.PropertyChanged, New System.ComponentModel.PropertyChangedEventHandler(AddressOf mainWebImageViewer_PropertyChanged) 
   '' 
   '' update some properties values 
   '' 
   AddHandler mainWebImageViewer.PropertyChanged, New System.ComponentModel.PropertyChangedEventHandler(AddressOf mainWebImageViewer_PropertyChanged) 
End Sub 
 
Sub mainWebImageViewer_PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) 
   If (e.PropertyName = "ScaleFactor") Then 
      '' ScaleFactor property changed. 
   ElseIf (e.PropertyName = "SizeMode") Then 
      '' SizeMode property changed. 
 
      '' 
      ''etc. 
      '' 
   End If 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Web Assembly