Example #1
0
 /// <summary>
 /// 登録されたfigureのBounds変更時にRootFigureのBoundsを調整する.
 /// </summary>
 private void HandleRegisteredFigureBoundsChanged(object sender, BoundsChangedEventArgs e)
 {
     if (_enableAutoAdjustRootFigureSize && !_DirtManager.IsInDirtying)
     {
         AdjustRootFigureBounds();
     }
 }
Example #2
0
        private void HandleRootFigureBoundsChanged(object sender, BoundsChangedEventArgs e)
        {
            //AutoScrollMinSize = e.NewBounds.Size + _canvasPadding.Size;
            if (e.NewBounds.Size != e.OldBounds.Size)
            {
                AutoScrollMinSize = e.NewBounds.Size;
            }

            if (e.IsMove)
            {
                AutoScrollPosition = new Point(
                    -AutoScrollPosition.X - e.LocationDelta.Width,
                    -AutoScrollPosition.Y - e.LocationDelta.Height
                    );
            }
        }