[This is preliminary documentation and is subject to change.]

Gets or sets value indicating if items implementing ICollectionCancelItem are allowed to cancel itselves being added/removed to/from the list.

Namespace: Tools.CollectionsT.GenericT
Assembly: Tools (in Tools.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
[BrowsableAttribute(false)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
public override sealed bool AllowItemCancel { get; set; }
Visual Basic
<BrowsableAttribute(False)> _
<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)> _
Public Overrides NotOverridable Property AllowItemCancel As Boolean
	Get
	Set
Visual C++
[BrowsableAttribute(false)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility::Hidden)]
public:
virtual property bool AllowItemCancel {
	bool get () override sealed;
	void set (bool value) override sealed;
}
F#
[<BrowsableAttribute(false)>]
[<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)>]
abstract AllowItemCancel : bool with get, set
[<BrowsableAttribute(false)>]
[<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)>]
override AllowItemCancel : bool with get, set
JScript
override final function get AllowItemCancel () : boolean
override final function set AllowItemCancel (value : boolean)

Field Value

False to prevent items from cancel itselves being added/removed; true to allow it. Default value is true.

Return Value

True if item are allowed to cancel itselves being added/removed; false when they are not

Remarks

When setting this property to false, consider calling LockAllowItemCancel()()()(), otherwise item can change value of this property and perform cancellation.

Exceptions

ExceptionCondition
System..::..InvalidOperationExceptionValue is being changed and IsAllowItemCancelLocked is true

See Also

Collapse/expand Version History

1.5.2

  • Property introduced