protected void RaiseDisplayCompletionList(IHasBounds nearToShape) { if (ShouldDisplayCompletionList != null) { ShouldDisplayCompletionList(nearToShape); } }
/// <summary> /// Initializes a new instance of the <see cref="XCasePrimitiveJunction"/> class. /// </summary> /// <param name="xCaseCanvas">canvas where the control is placed</param> /// <param name="sourceElement">source element</param> /// <param name="targetElement">target element</param> public XCasePrimitiveJunction(XCaseCanvas xCaseCanvas, IHasBounds sourceElement, IPrimitiveJunctionTarget targetElement) { SourceElement = sourceElement; TargetElement = targetElement; XCaseCanvas = xCaseCanvas; ((FrameworkElement)sourceElement).SizeChanged += delegate { InvalidateVisual(); }; ((Control)sourceElement).LayoutUpdated += Source_LayoutUpdated; XCaseCanvas.Children.Add(this); Source_LayoutUpdated(null, null); Pen = MediaLibrary.SolidBlackPen; }
//void MyRootControl_ShapeNeedsRedraw(IDrawableRect ShapeToRedraw) //{ // this.Redraw(ShapeToRedraw); //} void MyRootControl_ShouldDisplayCompletionList(IHasBounds nearToShape) { System.Drawing.Rectangle R; R = new System.Drawing.Rectangle ( nearToShape.Bounds.Location.X - MainShape.Scrollable.DeltaX + this.Left, nearToShape.Bounds.Location.Y - MainShape.Scrollable.DeltaY + this.Top, nearToShape.Bounds.Size.X, nearToShape.Bounds.Size.Y ); UIManager.DropDownList.Show(R, this); }
public void DisplayCompletionList(IHasBounds nearToShape) { RaiseDisplayCompletionList(nearToShape); }