GdPicture.NET.14
GdPicture14.WPF Namespace / GdViewer Class / RegionEdited Event
Example





In This Topic
RegionEdited Event
In This Topic
This event is raised when a highlighted region has been moved or resized, which actually means edited, by a user using the mouse.

The event makes use of bubble routing strategy. Please check the corresponded GdViewer.RegionEditedEventArgs for given parameters.

Highlighted regions for currently displayed document are identified and created when searching text, for example using the SearchText(String,Int32,Boolean) method or the second similar overloaded method as well. You can also define highlighted regions directly using the AddRegion(String,Double,Double,Double,Double,Color,RegionFillMode) method.

Syntax
'Declaration
 
Public Event RegionEdited As GdViewer.RegionEditedHandler
public event GdViewer.RegionEditedHandler RegionEdited
public event RegionEdited: GdViewer.RegionEditedHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.RegionEditedHandler* RegionEdited
public:
event GdViewer.RegionEditedHandler^ RegionEdited
Event Data

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

PropertyDescription
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
The unique region identifier of the highlighted region edited by a user.  
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
Remarks
Be aware that the RegionsAreEditable property needs to be turned on to enable region editing.
Example
How to utilize this event in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated
'and the RegionEdited event has been properly added.
            
'Define the event.
Sub GdViewer1_RegionEdited(ByVal sender As Object, ByVal e As GdPicture14.WPF.GdViewer.RegionEditedEventArgs)
    'Do your stuff here.
End Sub
//We assume that the GdViewer1 control has been properly integrated
//and the RegionEdited event has been properly added.
            
//Define the event.
void GdViewer1_RegionEdited(object sender, GdPicture14.WPF.GdViewer.RegionEditedEventArgs e)
{
    //Do your stuff here.
}
See Also