Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CollapsePlacematCommand"/> class.
        /// </summary>
        /// <param name="placematModel">The placemat to collapse or expand.</param>
        /// <param name="collapse">True if the placemat should be collapsed, false otherwise.</param>
        /// <param name="collapsedElements">If collapsing the placemat, the elements hidden by the collapsed placemat.</param>
        public CollapsePlacematCommand(IPlacematModel placematModel, bool collapse,
                                       IReadOnlyList <IGraphElementModel> collapsedElements) : this()
        {
            PlacematModel     = placematModel;
            Collapse          = collapse;
            CollapsedElements = collapsedElements;

            UndoString = Collapse ? "Collapse Placemat" : "Expand Placemat";
        }
Exemple #2
0
 public static IReadOnlyCollection <IGraphElementModel> DeletePlacemat(this IGraphModel self, IPlacematModel placematToDelete)
 {
     return(self.DeletePlacemats(new[] { placematToDelete }));
 }
 public static IModelUI CreateForPlacemat(this ElementBuilder elementBuilder,
                                          CommandDispatcher commandDispatcher, IPlacematModel model)
 {
     return(GraphViewFactoryExtensions.CreatePlacemat(elementBuilder, commandDispatcher, model));
 }
        public static IModelUI CreatePlacemat(this ElementBuilder elementBuilder, CommandDispatcher commandDispatcher, IPlacematModel model)
        {
            var ui = new Placemat();

            ui.SetupBuildAndUpdate(model, commandDispatcher, elementBuilder.View, elementBuilder.Context);
            return(ui);
        }