示例#1
0
 public RoundedRectangleGeometry(Rect bounds, double radius)
 {
   var segments = new PathSegments();
   segments.AddRange(CreateRoundedRectangle(bounds, radius));
   Figures = new PathFigures {
     new PathFigure {
       StartPoint = bounds.TopLeft + new Point(radius,0),
       Segments = segments
     }
   };
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PathGeometry"/> class.
 /// </summary>
 public PathGeometry()
 {
     Figures = new PathFigures();
 }
示例#3
0
        private void OnFiguresChanged(PathFigures oldValue, PathFigures newValue)
        {
            _figuresObserver?.Dispose();
            _figuresPropertiesObserver?.Dispose();

            _figuresObserver = newValue?.ForEachItem(f => NotifyChanged(), f => NotifyChanged(), () => NotifyChanged());
            _figuresPropertiesObserver = newValue?.TrackItemPropertyChanged(t => NotifyChanged());
        }