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





In This Topic
ClickMenu Event (GdViewer)
In This Topic
This event is raised when an item of the contextual menu has been clicked. The event occurs after the action specified by the clicked menu item has been executed.

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

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

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

PropertyDescription
(Inherited from System.Windows.RoutedEventArgs)
The index of the menu item that has been clicked. The available values representing individual menu items are listed below (please see the corresponding ordering number for each menu item):

2: Pages / Frames || Goto First

3: Pages / Frames || Goto Previous

4: Pages / Frames || Goto Next

5: Pages / Frames || Goto Last

100: Play Gif

200: Stop Gif Animation

310: Rotation || Rotate Page 90°

311: Rotation || Rotate Page 180°

312: Rotation || Rotate Page 270°

313: Rotation || Flip Page Horizontally

314: Rotation || Flip Page Vertically

315: Rotation || Rotate View 90°

316: Rotation || Rotate View 180°

317: Rotation || Rotate View 270°

318: Rotation || Flip View Horizontally

319: Rotation || Flip View Vertically

400: ScrollBars

500: Copy Bitmap to Clipboard

501: Copy Text to Clipboard

601: Zoom || Zoom in

602: Zoom || Zoom out

603: Zoom || Zoom 100%

604: Zoom || Zoom to selected area

605: Zoom || Fit image to viewer (keep aspect ratio)

606: Zoom || Fit image to viewer width

607: Zoom || Fit image to viewer height

608: Zoom || Shrink image to viewer width

701: Mouse Mode || Nothing

702: Mouse Mode || Hand Pan Tool

703: Mouse Mode || Area Selection Tool

704: Mouse Mode || Area Zooming Tool

705: Mouse Mode || Magnifier Tool

801: ViewerQuality || Low

802: ViewerQuality || Medium

803: ViewerQuality || High

 
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
Example
How to utilize this event in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated
'and the ClickMenu event has been properly added.
            
'Define the event.
Sub GdViewer1_ClickMenu(ByVal sender As Object, ByVal e As GdPicture14.WPF.GdViewer.ClickMenuEventArgs)
    MessageBox.Show("The clicked menu item: " + e.MenuItem.ToString(), "GdViewer1.ClickMenu")
End Sub
//We assume that the GdViewer1 control has been properly integrated
//and the ClickMenu event has been properly added.
            
//Define the event.
void GdViewer1_ClickMenu(object sender, GdPicture14.WPF.GdViewer.ClickMenuEventArgs e)
{
    MessageBox.Show("The clicked menu item: " + e.MenuItem.ToString(), "GdViewer1.ClickMenu");
}
See Also