문제

Is it possible to find the bounding rectangle of a PathFigureCollection object, in c# ? (I know how to get it using a FrameworkElement but that's not what I want)

도움이 되었습니까?

해결책

Try to include your PathFigureCollection in a PathGeometry object, and then you can access the bounding rectangle via the Bounds property.

Example

var geometry = new PathGeometry {
    Figures = new PathFigureCollection()
};
var boundingRect = geometry.Bounds;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top