Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.5.5
|
Leadtools.Web.Controls Namespace > WebImageViewer Class : PropertyChanged Event |
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
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. |
This example handles the PropertyChanged event.
Imports Leadtools Imports Leadtools.Codecs Imports Leadtools.ImageProcessing Imports Leadtools.Web.Controls <TestMethod()> _ 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
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. // }