LEADTOOLS WebForms and AJAX (Leadtools.Web assembly)
LEAD Technologies, Inc

PropertyChanged Event (WebImageViewer)

Example 





Notifies clients that a property value has changed.
Syntax
public event PropertyChangedEventHandler PropertyChanged
'Declaration
 
Public Event PropertyChanged As PropertyChangedEventHandler
'Usage
 
Dim instance As WebImageViewer
Dim handler As PropertyChangedEventHandler
 
AddHandler instance.PropertyChanged, handler
public event PropertyChangedEventHandler PropertyChanged
add_PropertyChanged(function(sender, e))
remove_PropertyChanged(function(sender, e))

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 Visual Basic) or String.Empty as the property name in the System.ComponentModel.PropertyChangedEventArgs.
Example
 
Public Sub WebImageViewer_PropertyChanged(ByVal mainWebImageViewer As 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
public void WebImageViewer_PropertyChanged(WebImageViewer mainWebImageViewer)
{
   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.
   //
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

WebImageViewer Class
WebImageViewer Members
WebImageViewer Client Class

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.