Пример #1
0
 /// <summary>
 /// Gets the (first) shape representing the given element in the current view.
 /// </summary>
 public static T GetShape <T>(this ModelElement element) where T : NodeShape
 {
     return(element.GetShape() as T);
 }
Пример #2
0
 /// <summary>
 /// Gets the (first) shape representing the given element, in the given diagram
 /// </summary>
 public static T GetShape <T>(this ModelElement element, Diagram diagram) where T : NodeShape
 {
     return(element.GetShape(diagram) as T);
 }
Пример #3
0
        /// <summary>
        /// Gets the (first) shape representing the given element, in the current view
        /// </summary>
        public static NodeShape GetShape(this ModelElement element)
        {
            Guard.NotNull(() => element, element);

            return(element.GetShape(element.Store.GetCurrentDiagram()));
        }