Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get PathFigureCollection bounding rectangle

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)

like image 913
Ben Avatar asked Jan 17 '26 16:01

Ben


1 Answers

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;
like image 142
abdelkarim Avatar answered Jan 20 '26 06:01

abdelkarim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!