Beispiel #1
0
        //StarPad for Logic Expression Recognition
        #region StarPad


        public bool HitTestAltsMenuCreator(InkCanvas parentInkCanvas, Point center)
        {
            HitTestResult result;
            foreach (Object obj in alternatesMenu.Items)
            {
                if (obj is MenuItem)
                {
                    MenuItem _menuItem = (MenuItem)obj;
                    result = VisualTreeHelper.HitTest(_menuItem, parentInkCanvas.TransformToDescendant(_menuItem).Transform(center));
                    if (result != null)
                    {
                        AltsMenuCreator.ChooseAlternate(_menuItem);
                        return true;
                    }
                }
            }
            return false;
        }