Example #1
0
        private void controlNavigator1_ButtonClick(object sender, NavigatorButtonClickEventArgs e)
        {
            ControlNavigator navigator = (ControlNavigator)sender;

            if (e.Button == navigator.Buttons.CustomButtons[0])
            {
                FieldInfo fi = typeof(NavigatorButtonsBase).GetField("viewInfo", BindingFlags.Instance | BindingFlags.NonPublic);
                NavigatorButtonsViewInfo buttonsViewInfo = (NavigatorButtonsViewInfo)fi.GetValue(navigator.ViewInfo.Buttons);
                Point mousePosition = navigator.PointToClient(Control.MousePosition);
                NavigatorButtonViewInfo buttonViewInfo = buttonsViewInfo.ButtonViewInfoAt(mousePosition);
                Point menuPosition = new Point(buttonViewInfo.Bounds.Left, buttonViewInfo.Bounds.Bottom);
                menuPosition = navigator.PointToScreen(menuPosition);
                popupMenu1.ShowPopup(menuPosition);
            }
        }
 public MyNavigatorTextViewInfo(NavigatorButtonsViewInfo viewInfo)
     : base(viewInfo)
 {
 }