By default, a dynamic menu automatically disappears after a certain duration when the mouse pointer is no longer positioned over the menu. Use the DisappearAfter property to specify the duration.
A dynamic menu disappears immediately if the user clicks outside of the menu.
You can also specify that a dynamic menu should never automatically disappear by setting this property to -1. In this case, the dynamic menu item will disappear only when the user clicks outside the menu.
The following code example demonstrates how to use the DisappearAfter property to specify that a dynamic menu should disappear after the user moves the mouse pointer away from the menu for more than two seconds.