Ben*_*Ben 3 wpf path bounding-box
是否有可能在c#中找到PathFigureCollection对象的边界矩形?(我知道如何使用FrameworkElement获取它,但这不是我想要的)
尝试将您包含PathFigureCollection在一个PathGeometry对象中,然后您可以通过该Bounds属性访问边界矩形.
例
var geometry = new PathGeometry {
Figures = new PathFigureCollection()
};
var boundingRect = geometry.Bounds;
Run Code Online (Sandbox Code Playgroud)