Freigeben über


SelectionState.CoercedSelection Property

Gets the coerced selection by applying coercion rules to the actual selection. NOTE: The returned value can be null. A null coercion indicates that the selection state doesn't define coercion rules (i.e. a multiple seleciton including only comment connectors is covered by the GeneralSelection state, which doesn't define any coercions rules, so the seleciton's coercion is null). If coercion rules are defined for a selection state, but the coercion fails (as would be the case for a selection including several components belonging to different zones), the coerced selection exists but is empty. These helpers can be used to demystify the results of coercing a selection: * IsCoercible - true if the seleciton can be coerced (i.e. the selection state does define coercion rules). CoercedSelection will return a collection, but it may be empty. * IsCoercionFailure - true if the actual selection can be coerced, but the coercion fails (due coercion rules.) CoercedSelection will be an empy collection. * HasCoercion - true if the actual selection is coercable and its coercion does not fail. CoercedSelection will return a non-empty collection.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)

Syntax

'Declaration
Public Overridable ReadOnly Property CoercedSelection As ICollection
    Get
public virtual ICollection CoercedSelection { get; }
public:
virtual property ICollection^ CoercedSelection {
    ICollection^ get ();
}
abstract CoercedSelection : ICollection
override CoercedSelection : ICollection
function get CoercedSelection () : ICollection

Property Value

Type: System.Collections.ICollection

.NET Framework Security

See Also

Reference

SelectionState Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace