次の方法で共有


SelectionState.CoercedSelection Property

Definition

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.
public:
 virtual property System::Collections::ICollection ^ CoercedSelection { System::Collections::ICollection ^ get(); };
public virtual System.Collections.ICollection CoercedSelection { get; }
member this.CoercedSelection : System.Collections.ICollection
Public Overridable ReadOnly Property CoercedSelection As ICollection

Property Value

Collection of pels/mels in the coerced selection. Can be null.

Applies to