public ZToolTip() { this.Initialized += (o, e) => { this.mPlacement = this.PlacementEx; }; }
public AduToolTip() { Utility.Refresh(this); this.Initialized += (o, e) => { this.mPlacement = this.PlacementEx; }; }
private void SetLeftPosition(double pointX, EnumPlacement placement) { if (pointX < this.ActualWidth) { this.PlacementEx = placement; } else { this.PlacementEx = this.mPlacement; } }
private void SetTopPosition(double pointY, EnumPlacement placement) { if (pointY < this.ActualHeight) { this.PlacementEx = placement; } else { this.PlacementEx = this.mPlacement; } }
private static void PlacementExChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) { Poptip poptip = d as Poptip; if (poptip != null) { EnumPlacement placement = (EnumPlacement)e.NewValue; switch (placement) { case EnumPlacement.LeftTop: break; case EnumPlacement.LeftBottom: break; case EnumPlacement.LeftCenter: break; case EnumPlacement.RightTop: break; case EnumPlacement.RightBottom: break; case EnumPlacement.RightCenter: break; case EnumPlacement.TopLeft: break; case EnumPlacement.TopCenter: poptip.Placement = PlacementMode.Top; break; case EnumPlacement.TopRight: break; case EnumPlacement.BottomLeft: break; case EnumPlacement.BottomCenter: break; case EnumPlacement.BottomRight: break; default: break; } } }
private void SetRightPosition(double workAreaX, double controlWidth, double pointX, EnumPlacement placement) { if (workAreaX - (pointX + controlWidth) < this.ActualWidth) { this.PlacementEx = placement; } else { this.PlacementEx = this.mPlacement; } }
private void SetBottomPosition(double workAreaY, double controlHeight, double pointY, EnumPlacement placement) { if (workAreaY - (pointY + controlHeight) < this.ActualHeight) { this.PlacementEx = placement; } else { this.PlacementEx = this.mPlacement; } }