Share via


PagedCollectionView.CancelNew Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Ends the add transaction and discards the pending new item.

Namespace:  System.Windows.Data
Assembly:  System.Windows.Data (in System.Windows.Data.dll)

Syntax

'Declaration
Public Sub CancelNew
public void CancelNew()

Implements

IEditableCollectionView.CancelNew()

Exceptions

Exception Condition
InvalidOperationException

IsEditingItem is true.

Remarks

You start an add transaction by calling AddNew and end it by calling CommitNew or CancelNew.

CancelNew ends the add transaction and removes the new item from the underlying collection.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.