Beispiel #1
0
        public override bool CanShowPopupMenu(Point position)
        {
            LayoutViewHitTest hitTest = XafLayoutView.CalcHitInfo(Grid.PointToClient(position)).HitTest;

            return
                ((hitTest == LayoutViewHitTest.Card) ||
                 (hitTest == LayoutViewHitTest.Field) ||
                 (hitTest == LayoutViewHitTest.FieldValue) ||
                 (hitTest == LayoutViewHitTest.FieldCaption) ||
                 (hitTest == LayoutViewHitTest.CardCaption) ||
                 (hitTest == LayoutViewHitTest.LayoutItem) ||
                 (hitTest == LayoutViewHitTest.None));
        }
Beispiel #2
0
 protected virtual void ProcessMouseClick(EventArgs e)
 {
     if (!_selectedItemExecuting)
     {
         if (ColumnView.FocusedRowHandle >= 0)
         {
             DXMouseEventArgs  args    = DXMouseEventArgs.GetMouseArgs(Grid, e);
             LayoutViewHitInfo hitInfo = XafLayoutView.CalcHitInfo(args.Location);
             if (hitInfo.InCard &&
                 (hitInfo.HitTest == LayoutViewHitTest.FieldCaption ||
                  hitInfo.HitTest == LayoutViewHitTest.CardCaption ||
                  hitInfo.HitTest == LayoutViewHitTest.Field ||
                  hitInfo.HitTest == LayoutViewHitTest.FieldValue ||
                  hitInfo.HitTest == LayoutViewHitTest.LayoutItem)
                 )
             {
                 args.Handled = true;
                 OnProcessSelectedItem();
             }
         }
     }
 }