public void Update(PopupPositionerParameters parameters) { Update(_popup.TranslateSize(parameters.Size), parameters.Size, new Rect(_popup.TranslatePoint(parameters.AnchorRectangle.TopLeft), _popup.TranslateSize(parameters.AnchorRectangle.Size)), parameters.Anchor, parameters.Gravity, parameters.ConstraintAdjustment, _popup.TranslatePoint(parameters.Offset)); }
public void Update(PopupPositionerParameters parameters) { var rect = Calculate( parameters.Size * _popup.Scaling, new Rect( parameters.AnchorRectangle.TopLeft * _popup.Scaling, parameters.AnchorRectangle.Size * _popup.Scaling), parameters.Anchor, parameters.Gravity, parameters.ConstraintAdjustment, parameters.Offset * _popup.Scaling); _popup.MoveAndResize( rect.Position, rect.Size / _popup.Scaling); }