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 } }; }
/// <summary> /// Initializes a new instance of the <see cref="PathGeometry"/> class. /// </summary> public PathGeometry() { Figures = new PathFigures(); }
private void OnFiguresChanged(PathFigures oldValue, PathFigures newValue) { _figuresObserver?.Dispose(); _figuresPropertiesObserver?.Dispose(); _figuresObserver = newValue?.ForEachItem(f => NotifyChanged(), f => NotifyChanged(), () => NotifyChanged()); _figuresPropertiesObserver = newValue?.TrackItemPropertyChanged(t => NotifyChanged()); }