示例#1
0
 /// <summary>
 /// Obsolete API will be removed soon
 /// </summary>
 /// <param name="evt">The DomEvent that triggered the launch(usually a mouse click)</param>
 internal bool LaunchContextMenu(HtmlElement targetElement, HtmlEvent evt)
 {
     _targetElement = targetElement;
     _launchPosition = GetMenuPosition(evt);
     LaunchMenu(null);
     Menu.FocusOnFirstItem(evt);
     return true;
 }
示例#2
0
        /// <summary>
        /// By default this places the menu where mouse was clicked
        /// </summary>
        /// <param name="comp"></param>
        protected virtual Bounds GetMenuPosition(HtmlEvent evt)
        {
            Bounds b = new Bounds(0, 0, 0, 0);

            b.Y = evt.ClientY;
            b.X = evt.ClientX;
            return b;
        }