public Point GetLocationRelativeToOutmostPanel(Point location) { StateContainerEditor designer = StateContainerEditor.GetVisualAncestor <StateContainerEditor>(this); StateContainerEditor outmostEditor = designer.GetOutmostStateContainerEditor(); return(this.TranslatePoint(location, outmostEditor.Panel)); }
internal bool IsOutmostPanel() { StateContainerEditor designer = StateContainerEditor.GetVisualAncestor <StateContainerEditor>(this); if (designer != null) { StateContainerEditor outmostEditor = designer.GetOutmostStateContainerEditor(); return(outmostEditor != null && this == outmostEditor.Panel); } return(false); }
static public List <Point> GetEdgeRelativeToOutmostPanel(ConnectionPoint connectionPoint) { FreeFormPanel parentPanel = StateContainerEditor.GetVisualAncestor <FreeFormPanel>(connectionPoint.ParentDesigner); List <Point> edge = new List <Point>(); foreach (Point point in connectionPoint.Edge) { edge.Add(parentPanel.GetLocationRelativeToOutmostPanel(point)); } return(edge); }
static public Point GetLocationRelativeToOutmostPanel(ConnectionPoint connectionPoint) { FreeFormPanel parentPanel = StateContainerEditor.GetVisualAncestor <FreeFormPanel>(connectionPoint.ParentDesigner); return(parentPanel.GetLocationRelativeToOutmostPanel(connectionPoint.Location)); }