protected override void OnPreviewDragOver(RadDragOverEventArgs e)
        {
            GanttGraphicalViewBaseTaskElement context = this.Context as GanttGraphicalViewBaseTaskElement;

            if (context != null)
            {
                e.CanDrop = context.Parent == e.HitTarget;
            }
            base.OnPreviewDragOver(e);
        }
Example #2
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.taskElement            = this.CreateTaskElement();
     this.leftLinkHandleElement  = this.CreateLeftHandleElement();
     this.rightLinkHandleElement = this.CreateRightHandleElement();
     this.Children.Add((RadElement)this.taskElement);
     this.Children.Add((RadElement)this.leftLinkHandleElement);
     this.Children.Add((RadElement)this.rightLinkHandleElement);
 }
        protected override void OnStarting(RadServiceStartingEventArgs e)
        {
            GanttGraphicalViewBaseTaskElement context = e.Context as GanttGraphicalViewBaseTaskElement;

            if (context != null)
            {
                this.location    = context.PointToScreen(context.Location);
                this.location.Y += context.Size.Height / 2;
            }
            base.OnStarting(e);
        }
        protected override bool PrepareContext()
        {
            bool flag = base.PrepareContext();
            GanttGraphicalViewBaseTaskElement context = this.Context as GanttGraphicalViewBaseTaskElement;

            if (context != null)
            {
                this.xOutlineFormOffset = context.PointFromScreen(this.beginPoint.Value).X;
            }
            return(flag);
        }