Reference Guide
GdPicture14.WPF Namespace / GdViewer Class / PreviewRegionSelected Event





In This Topic
    PreviewRegionSelected Event
    In This Topic
    This event is raised when a highlighted region has been selected by a user using the mouse.

    The event makes use of tunel routing strategy. Please check the corresponded GdViewer.RegionSelectedEventArgs 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 PreviewRegionSelected As GdViewer.PreviewRegionSelectedHandler
    public event GdViewer.PreviewRegionSelectedHandler PreviewRegionSelected
    public event PreviewRegionSelected: GdViewer.PreviewRegionSelectedHandler; 
    In JScript, you can handle the events defined by another class, but you cannot define your own.
    public: __event GdViewer.PreviewRegionSelectedHandler* PreviewRegionSelected
    public:
    event GdViewer.PreviewRegionSelectedHandler^ PreviewRegionSelected
    Event Data

    The event handler receives an argument of type GdViewer.RegionSelectedEventArgs containing data related to this event. The following GdViewer.RegionSelectedEventArgs 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 selected 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 the region selection.
    Example
    Please follow the example for the RegionSelected event to motivate yourself on how to utilize this event in your GdViewer control.
    See Also