internal Point GetDGraphOffset(DGraph g) { if (g == Content) return PointZero; // This may throw an ArgumentException if the graph has not been loaded into the visual tree. GeneralTransform transform = g.TransformToVisual(this); Point ret = transform.Transform(PointZero); return ret; }