protected override Size MeasureOverride(Size constraint)
        {
            if (Graph == null)
            {
                return(constraint);
            }
            foreach (var child in Children)
            {
                child.Measure(constraint);
                if (vmOfCtrl.TryGetValue(child, out Wrapper w))
                {
                    w.UpdateBounds(child);
                }
            }
            Microsoft.Msagl.Miscellaneous.LayoutHelpers.CalculateLayout(graph.GeometryGraph, graph.LayoutAlgorithmSettings, null);
            var graphDesiredSize = AglToAvalonia.Convert(graph.BoundingBox.Size);

            return(graphDesiredSize);
        }
        protected override Size ArrangeOverride(Size finalSize)
        {
            if (Graph == null)
            {
                return(finalSize);
            }
            var a2a = new AglToAvalonia(graph.BoundingBox.LeftTop);

            foreach (var child in Children)
            {
                var bbox = GetBoundingBox(child);
                if (!bbox.HasValue)
                {
                    continue;
                }
                var childFinalSize = a2a.Convert(bbox.Value);
                child.Arrange(childFinalSize);
            }
            var graphSize = AglToAvalonia.Convert(graph.BoundingBox.Size);

            return(graphSize);
        }