DiagramSelectionRules.GetCompliantSelection 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
由设计图面调用以允许选择筛选
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
参数
- currentSelection
- SelectedShapesCollection
中添加或删除任何 ShapeElements 之前的当前选定内容。
- proposedItemsToAdd
- DiagramItemCollection
[in/out]要添加到所选内容的建议 DiagramItems。
- proposedItemsToRemove
- DiagramItemCollection
[in/out]要从选择内容中删除的建议 DiagramItems。
- primaryItem
- DiagramItem
[in/out]建议的 DiagramItem 成为所选内容的主要 DiagramItem。 空值表示应将结果选择中的最后一个 DiagramItem 假定为主要 DiagramItem。
返回
如果接受部分或全部所选内容,则为 true;如果拒绝了整个选择提议,则为 false。 如果为 false,则向用户提供相应的反馈,以指示所选内容已被拒绝。