BehaviorAdapter Class |
Namespace: Telogis.GeoBase
The BehaviorAdapter type exposes the following members.
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
KeyDownEvent |
Fired when the MapCtrl encounters a key down
event.
| |
KeyUpEvent |
Fired when the MapCtrl encounters a key up
event.
| |
MouseDownEvent |
Fired when the MapCtrl encounters a mouse
down event.
| |
MouseLeaveEvent |
Fired when the MapCtrl encounters a mouse
leave event.
| |
MouseMoveEvent |
Fired when the MapCtrl encounters a mouse
move event.
| |
MouseUpEvent |
Fired when the MapCtrl encounters a mouse
up event.
| |
MouseWheelEvent |
Fired when the MapCtrl encounters a mouse
wheel event.
|
This class provides a number of events that are called when the corresponding event is fired on the MapCtrl. If no handler is defined for the event, the default behavior of the MapCtrl is observed.
It is expected that if you define a handler for key down or mouse down which calls MapCtrl's default behavior, (if defined) your key up or mouse up event will call the default behavior also.
public class MyClass { MapCtrl m_MainMap = new MapCtrl(); //Define a method to perform some action when a key is pressed. private void onKeyDown(Object sender, EventArgs e) { //do some stuff before key down behavior is invoked... //invoke the default behavior if the keys shift and control are not pressed. if(!e.Shift && !e.Control) { m_MainMap.DefaultMapCtrlBehavior.KeyDown(sender, e); } //do some more stuff... } //Add the onKeyDown method to the events performed by the MapCtrl's BehaviorAdapter. m_MainMap.CustomMapBehavior.KeyDownEvent += new KeyEventHandler(onKeyDown); }