Freigeben über


DiagramSelectionRules.GetCompliantSelection Method

Definition

Called by the design surface to allow selection filtering

public:
 virtual bool GetCompliantSelection(Microsoft::VisualStudio::Modeling::Diagrams::SelectedShapesCollection ^ currentSelection, Microsoft::VisualStudio::Modeling::Diagrams::DiagramItemCollection ^ proposedItemsToAdd, Microsoft::VisualStudio::Modeling::Diagrams::DiagramItemCollection ^ proposedItemsToRemove, Microsoft::VisualStudio::Modeling::Diagrams::DiagramItem ^ primaryItem);
public virtual bool GetCompliantSelection (Microsoft.VisualStudio.Modeling.Diagrams.SelectedShapesCollection currentSelection, Microsoft.VisualStudio.Modeling.Diagrams.DiagramItemCollection proposedItemsToAdd, Microsoft.VisualStudio.Modeling.Diagrams.DiagramItemCollection proposedItemsToRemove, Microsoft.VisualStudio.Modeling.Diagrams.DiagramItem primaryItem);
abstract member GetCompliantSelection : Microsoft.VisualStudio.Modeling.Diagrams.SelectedShapesCollection * Microsoft.VisualStudio.Modeling.Diagrams.DiagramItemCollection * Microsoft.VisualStudio.Modeling.Diagrams.DiagramItemCollection * Microsoft.VisualStudio.Modeling.Diagrams.DiagramItem -> bool
override this.GetCompliantSelection : Microsoft.VisualStudio.Modeling.Diagrams.SelectedShapesCollection * Microsoft.VisualStudio.Modeling.Diagrams.DiagramItemCollection * Microsoft.VisualStudio.Modeling.Diagrams.DiagramItemCollection * Microsoft.VisualStudio.Modeling.Diagrams.DiagramItem -> bool
Public Overridable Function GetCompliantSelection (currentSelection As SelectedShapesCollection, proposedItemsToAdd As DiagramItemCollection, proposedItemsToRemove As DiagramItemCollection, primaryItem As DiagramItem) As Boolean

Parameters

currentSelection
SelectedShapesCollection

[in] The current selection before any ShapeElements are added or removed.

proposedItemsToAdd
DiagramItemCollection

[in/out] The proposed DiagramItems to be added to the selection.

proposedItemsToRemove
DiagramItemCollection

[in/out] The proposed DiagramItems to be removed from the selection.

primaryItem
DiagramItem

[in/out] The proposed DiagramItem to become the primary DiagramItem of the selection. A null value signifies that the last DiagramItem in the resultant selection should be assumed as the primary DiagramItem.

Returns

true if some or all of the selection was accepted; false if the entire selection proposal was rejected. If false, appropriate feedback will be given to the user to indicate that the selection was rejected.

Applies to