Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
566 lines (500 sloc) 37.1 KB
<Type Name="IEditableCollectionView" FullName="System.ComponentModel.IEditableCollectionView">
<TypeSignature Language="C#" Value="public interface IEditableCollectionView" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IEditableCollectionView" />
<TypeSignature Language="DocId" Value="T:System.ComponentModel.IEditableCollectionView" />
<TypeSignature Language="VB.NET" Value="Public Interface IEditableCollectionView" />
<TypeSignature Language="C++ CLI" Value="public interface class IEditableCollectionView" />
<TypeSignature Language="F#" Value="type IEditableCollectionView = interface" />
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces />
<Docs>
<summary>Defines methods and properties that a <see cref="T:System.Windows.Data.CollectionView" /> implements to provide editing capabilities to a collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When a collection view implements the <xref:System.ComponentModel.IEditableCollectionView> interface, you can directly change the underlying collection, if it allows changes to be made, by using the methods and properties that <xref:System.ComponentModel.IEditableCollectionView> exposes, regardless of the collection's type.
The types <xref:System.Windows.Controls.ItemCollection>, <xref:System.Windows.Data.BindingListCollectionView>, and <xref:System.Windows.Data.ListCollectionView> are the types that ship with [!INCLUDE[TLA#tla_winclient](~/includes/tlasharptla-winclient-md.md)] that inherit from <xref:System.Windows.Data.CollectionView>. These types also implement the <xref:System.ComponentModel.IEditableCollectionView>, so you can edit a collection that uses one of those types. <xref:System.Windows.Controls.ItemCollection>, in particular, is often used because the <xref:System.Windows.Controls.ItemsControl.Items%2A?displayProperty=nameWithType> property is an <xref:System.Windows.Controls.ItemCollection>.
## Examples
The following example shows how to add an item to a collection by using methods that are defined by <xref:System.ComponentModel.IEditableCollectionView>. This application displays a list of items for sale and gives the user the option of adding, editing, or removing an item. When the user adds or edits an item, a form prompts the user to enter a new item. If the user submits the form, the item is committed to the collection. If the user cancels the form, the item is discarded. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections).
[!code-csharp[EditingCollectionsSnippets#AddItem](~/samples/snippets/csharp/VS_Snippets_Wpf/EditingCollectionsSnippets/CSharp/Window1.xaml.cs#additem)]
[!code-vb[EditingCollectionsSnippets#AddItem](~/samples/snippets/visualbasic/VS_Snippets_Wpf/EditingCollectionsSnippets/visualbasic/window1.xaml.vb#additem)]
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="AddNew">
<MemberSignature Language="C#" Value="public object AddNew ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object AddNew() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.IEditableCollectionView.AddNew" />
<MemberSignature Language="VB.NET" Value="Public Function AddNew () As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Object ^ AddNew();" />
<MemberSignature Language="F#" Value="abstract member AddNew : unit -&gt; obj" Usage="iEditableCollectionView.AddNew " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Adds a new item to the collection.</summary>
<returns>The new item that is added to the collection.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Calling <xref:System.ComponentModel.IEditableCollectionView.AddNew%2A> begins an add transaction. You should call <xref:System.ComponentModel.IEditableCollectionView.CommitNew%2A> or <xref:System.ComponentModel.IEditableCollectionView.CancelNew%2A> to end the add transaction. A new item always appears in the collection view. Any filtering, sorting, or grouping that is applied to the view is applied to the new item when <xref:System.ComponentModel.IEditableCollectionView.CommitNew%2A> is called.
## Examples
The following example creates a <xref:System.Windows.Window> that prompts the user to add a new item. Then it calls <xref:System.ComponentModel.IEditableCollectionView.AddNew%2A> to create a new object and sets the <xref:System.Windows.FrameworkElement.DataContext%2A> of the <xref:System.Windows.Window> to that object. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections).
[!code-csharp[EditingCollectionsSnippets#AddItem](~/samples/snippets/csharp/VS_Snippets_Wpf/EditingCollectionsSnippets/CSharp/Window1.xaml.cs#additem)]
[!code-vb[EditingCollectionsSnippets#AddItem](~/samples/snippets/visualbasic/VS_Snippets_Wpf/EditingCollectionsSnippets/visualbasic/window1.xaml.vb#additem)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CanAddNew">
<MemberSignature Language="C#" Value="public bool CanAddNew { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CanAddNew" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.IEditableCollectionView.CanAddNew" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CanAddNew As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool CanAddNew { bool get(); };" />
<MemberSignature Language="F#" Value="member this.CanAddNew : bool" Usage="System.ComponentModel.IEditableCollectionView.CanAddNew" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether a new item can be added to the collection.</summary>
<value>
<see langword="true" /> if a new item can be added to the collection; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
An <xref:System.ComponentModel.IEditableCollectionView> can add a new item if the following are true:
- An item can be added to the underlying collection. For example, if the collection is read-only, <xref:System.ComponentModel.IEditableCollectionView.CanAddNew%2A> is `false`.
- The <xref:System.ComponentModel.IEditableCollectionView> can create an object of the type that is in the collection. For example, if the collection is of type <xref:System.Collections.ObjectModel.ObservableCollection%601>, the <xref:System.ComponentModel.IEditableCollectionView> must be able to create an object of type `T`.
## Examples
The following example checks whether an item can be added to the collection. If <xref:System.ComponentModel.IEditableCollectionView.CanAddNew%2A> is `false`, the example tells the user that an item cannot be added. Otherwise, it shows a form that prompts the user to add a new item. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections) .
[!code-csharp[EditingCollectionsSnippets#AddItem](~/samples/snippets/csharp/VS_Snippets_Wpf/EditingCollectionsSnippets/CSharp/Window1.xaml.cs#additem)]
[!code-vb[EditingCollectionsSnippets#AddItem](~/samples/snippets/visualbasic/VS_Snippets_Wpf/EditingCollectionsSnippets/visualbasic/window1.xaml.vb#additem)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CanCancelEdit">
<MemberSignature Language="C#" Value="public bool CanCancelEdit { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CanCancelEdit" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.IEditableCollectionView.CanCancelEdit" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CanCancelEdit As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool CanCancelEdit { bool get(); };" />
<MemberSignature Language="F#" Value="member this.CanCancelEdit : bool" Usage="System.ComponentModel.IEditableCollectionView.CanCancelEdit" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object.</summary>
<value>
<see langword="true" /> if the collection view can discard pending changes and restore the original values of an edited object; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.ComponentModel.IEditableCollectionView.CanCancelEdit%2A> is `true` if the view supports the notion of "pending changes" on the currently edited item. For example, a collection view might return `true` if the edited item implements <xref:System.ComponentModel.IEditableObject>, or if the view has information about the item's state that it can use to roll back changes. <xref:System.ComponentModel.IEditableCollectionView.CanCancelEdit%2A> is `false` if the view cannot revert changes on an object. In that case, call <xref:System.ComponentModel.IEditableCollectionView.CancelEdit%2A> to cause the view to exit the edit state and provide logic to revert the changes on the object that was edited.
## Examples
The following example gets <xref:System.ComponentModel.IEditableCollectionView.CanCancelEdit%2A> to check whether the original values of the edited item can be restored before it calls <xref:System.ComponentModel.IEditableCollectionView.CancelEdit%2A>. If the values cannot be restored, you must supply additional logic to do so. If they can be, the values are restored when the example calls <xref:System.ComponentModel.IEditableCollectionView.CancelEdit%2A>. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections).
[!code-csharp[EditingCollectionsSnippets#CancelEdit](~/samples/snippets/csharp/VS_Snippets_Wpf/EditingCollectionsSnippets/CSharp/Window1.xaml.cs#canceledit)]
[!code-vb[EditingCollectionsSnippets#CancelEdit](~/samples/snippets/visualbasic/VS_Snippets_Wpf/EditingCollectionsSnippets/visualbasic/window1.xaml.vb#canceledit)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CancelEdit">
<MemberSignature Language="C#" Value="public void CancelEdit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CancelEdit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.IEditableCollectionView.CancelEdit" />
<MemberSignature Language="VB.NET" Value="Public Sub CancelEdit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void CancelEdit();" />
<MemberSignature Language="F#" Value="abstract member CancelEdit : unit -&gt; unit" Usage="iEditableCollectionView.CancelEdit " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Ends the edit transaction and, if possible, restores the original value to the item.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.ComponentModel.IEditableCollectionView.CancelEdit%2A> sets <xref:System.ComponentModel.IEditableCollectionView.CurrentEditItem%2A> to `null` and causes the collection view to exit the edit state. If <xref:System.ComponentModel.IEditableCollectionView.CanCancelEdit%2A> is `true`, <xref:System.ComponentModel.IEditableCollectionView.CancelEdit%2A> also restores the original values of the edited object.
## Examples
The following example gets <xref:System.ComponentModel.IEditableCollectionView.CanCancelEdit%2A> to check whether the original values of the edited item can be restored before it calls <xref:System.ComponentModel.IEditableCollectionView.CancelEdit%2A>. If the values cannot be restored, you must supply additional logic to do so. If they can be, the values are restored when the example calls <xref:System.ComponentModel.IEditableCollectionView.CancelEdit%2A>. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections).
[!code-csharp[EditingCollectionsSnippets#CancelEdit](~/samples/snippets/csharp/VS_Snippets_Wpf/EditingCollectionsSnippets/CSharp/Window1.xaml.cs#canceledit)]
[!code-vb[EditingCollectionsSnippets#CancelEdit](~/samples/snippets/visualbasic/VS_Snippets_Wpf/EditingCollectionsSnippets/visualbasic/window1.xaml.vb#canceledit)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CancelNew">
<MemberSignature Language="C#" Value="public void CancelNew ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CancelNew() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.IEditableCollectionView.CancelNew" />
<MemberSignature Language="VB.NET" Value="Public Sub CancelNew ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void CancelNew();" />
<MemberSignature Language="F#" Value="abstract member CancelNew : unit -&gt; unit" Usage="iEditableCollectionView.CancelNew " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Ends the add transaction and discards the pending new item.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example displays a form that prompts the user to add a new item. If the user submits the form, the example calls <xref:System.ComponentModel.IEditableCollectionView.CommitNew%2A> to add the item to the collection. If the user cancels the form, the example calls <xref:System.ComponentModel.IEditableCollectionView.CancelNew%2A> to discard the item. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections).
[!code-csharp[EditingCollectionsSnippets#AddItem](~/samples/snippets/csharp/VS_Snippets_Wpf/EditingCollectionsSnippets/CSharp/Window1.xaml.cs#additem)]
[!code-vb[EditingCollectionsSnippets#AddItem](~/samples/snippets/visualbasic/VS_Snippets_Wpf/EditingCollectionsSnippets/visualbasic/window1.xaml.vb#additem)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CanRemove">
<MemberSignature Language="C#" Value="public bool CanRemove { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CanRemove" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.IEditableCollectionView.CanRemove" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CanRemove As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool CanRemove { bool get(); };" />
<MemberSignature Language="F#" Value="member this.CanRemove : bool" Usage="System.ComponentModel.IEditableCollectionView.CanRemove" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether an item can be removed from the collection.</summary>
<value>
<see langword="true" /> if an item can be removed from the collection; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.ComponentModel.IEditableCollectionView.CanRemove%2A> is `false` if the underlying collection is read-only.
## Examples
The following example calls <xref:System.ComponentModel.IEditableCollectionView.CanRemove%2A> to check whether an item can be removed from the collection. If an item can be removed, the example prompts the user to confirm the action and calls <xref:System.ComponentModel.IEditableCollectionView.Remove%2A> if the user clicks **Yes**. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections).
[!code-csharp[EditingCollectionsSnippets#RemoveItem](~/samples/snippets/csharp/VS_Snippets_Wpf/EditingCollectionsSnippets/CSharp/Window1.xaml.cs#removeitem)]
[!code-vb[EditingCollectionsSnippets#RemoveItem](~/samples/snippets/visualbasic/VS_Snippets_Wpf/EditingCollectionsSnippets/visualbasic/window1.xaml.vb#removeitem)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CommitEdit">
<MemberSignature Language="C#" Value="public void CommitEdit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CommitEdit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.IEditableCollectionView.CommitEdit" />
<MemberSignature Language="VB.NET" Value="Public Sub CommitEdit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void CommitEdit();" />
<MemberSignature Language="F#" Value="abstract member CommitEdit : unit -&gt; unit" Usage="iEditableCollectionView.CommitEdit " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Ends the edit transaction and saves the pending changes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example creates a form that prompts the user to edit an existing item. If the user submits the form, the example calls <xref:System.ComponentModel.IEditableCollectionView.CommitEdit%2A> to save the changes to the collection. If the user cancels the form, the example calls <xref:System.ComponentModel.IEditableCollectionView.CancelEdit%2A> to discard the changes. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections).
[!code-csharp[EditingCollectionsSnippets#EditItem](~/samples/snippets/csharp/VS_Snippets_Wpf/EditingCollectionsSnippets/CSharp/Window1.xaml.cs#edititem)]
[!code-vb[EditingCollectionsSnippets#EditItem](~/samples/snippets/visualbasic/VS_Snippets_Wpf/EditingCollectionsSnippets/visualbasic/window1.xaml.vb#edititem)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CommitNew">
<MemberSignature Language="C#" Value="public void CommitNew ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CommitNew() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.IEditableCollectionView.CommitNew" />
<MemberSignature Language="VB.NET" Value="Public Sub CommitNew ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void CommitNew();" />
<MemberSignature Language="F#" Value="abstract member CommitNew : unit -&gt; unit" Usage="iEditableCollectionView.CommitNew " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Ends the add transaction and saves the pending new item.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Any filtering, sorting, or grouping that is applied to the <xref:System.Windows.Data.CollectionView> is applied to the new item when <xref:System.ComponentModel.IEditableCollectionView.CommitNew%2A> is called.
## Examples
The following example displays a form that prompts the user to add a new item. If the user submits the form, the example calls <xref:System.ComponentModel.IEditableCollectionView.CommitNew%2A> to add the item to the collection. If the user cancels the form, the example calls <xref:System.ComponentModel.IEditableCollectionView.CancelNew%2A> to discard the item. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections).
[!code-csharp[EditingCollectionsSnippets#AddItem](~/samples/snippets/csharp/VS_Snippets_Wpf/EditingCollectionsSnippets/CSharp/Window1.xaml.cs#additem)]
[!code-vb[EditingCollectionsSnippets#AddItem](~/samples/snippets/visualbasic/VS_Snippets_Wpf/EditingCollectionsSnippets/visualbasic/window1.xaml.vb#additem)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CurrentAddItem">
<MemberSignature Language="C#" Value="public object CurrentAddItem { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object CurrentAddItem" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.IEditableCollectionView.CurrentAddItem" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CurrentAddItem As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Object ^ CurrentAddItem { System::Object ^ get(); };" />
<MemberSignature Language="F#" Value="member this.CurrentAddItem : obj" Usage="System.ComponentModel.IEditableCollectionView.CurrentAddItem" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the item that is being added during the current add transaction.</summary>
<value>The item that is being added if <see cref="P:System.ComponentModel.IEditableCollectionView.IsAddingNew" /> is <see langword="true" />; otherwise, <see langword="null" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CurrentEditItem">
<MemberSignature Language="C#" Value="public object CurrentEditItem { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object CurrentEditItem" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.IEditableCollectionView.CurrentEditItem" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CurrentEditItem As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Object ^ CurrentEditItem { System::Object ^ get(); };" />
<MemberSignature Language="F#" Value="member this.CurrentEditItem : obj" Usage="System.ComponentModel.IEditableCollectionView.CurrentEditItem" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the item in the collection that is being edited.</summary>
<value>The item in the collection that is being edited if <see cref="P:System.ComponentModel.IEditableCollectionView.IsEditingItem" /> is <see langword="true" />; otherwise, <see langword="null" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="EditItem">
<MemberSignature Language="C#" Value="public void EditItem (object item);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void EditItem(object item) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.IEditableCollectionView.EditItem(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub EditItem (item As Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void EditItem(System::Object ^ item);" />
<MemberSignature Language="F#" Value="abstract member EditItem : obj -&gt; unit" Usage="iEditableCollectionView.EditItem item" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="item" Type="System.Object" />
</Parameters>
<Docs>
<param name="item">The item to edit.</param>
<summary>Begins an edit transaction of the specified item.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example creates a form that prompts the user to edit an existing item. If the user submits the form, the changes are committed to the collection. If the user cancels the form, the changes are discarded. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections) .
[!code-csharp[EditingCollectionsSnippets#EditItem](~/samples/snippets/csharp/VS_Snippets_Wpf/EditingCollectionsSnippets/CSharp/Window1.xaml.cs#edititem)]
[!code-vb[EditingCollectionsSnippets#EditItem](~/samples/snippets/visualbasic/VS_Snippets_Wpf/EditingCollectionsSnippets/visualbasic/window1.xaml.vb#edititem)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsAddingNew">
<MemberSignature Language="C#" Value="public bool IsAddingNew { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsAddingNew" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.IEditableCollectionView.IsAddingNew" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsAddingNew As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsAddingNew { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsAddingNew : bool" Usage="System.ComponentModel.IEditableCollectionView.IsAddingNew" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether an add transaction is in progress.</summary>
<value>
<see langword="true" /> if an add transaction is in progress; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You begin an add transaction by calling <xref:System.ComponentModel.IEditableCollectionView.AddNew%2A> and end the add transaction by calling <xref:System.ComponentModel.IEditableCollectionView.CommitNew%2A> or <xref:System.ComponentModel.IEditableCollectionView.CancelNew%2A>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsEditingItem">
<MemberSignature Language="C#" Value="public bool IsEditingItem { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsEditingItem" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.IEditableCollectionView.IsEditingItem" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsEditingItem As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsEditingItem { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsEditingItem : bool" Usage="System.ComponentModel.IEditableCollectionView.IsEditingItem" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether an edit transaction is in progress.</summary>
<value>
<see langword="true" /> if an edit transaction is in progress; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You begin an edit transaction by calling <xref:System.ComponentModel.IEditableCollectionView.EditItem%2A> and end the transaction by calling <xref:System.ComponentModel.IEditableCollectionView.CommitEdit%2A> or <xref:System.ComponentModel.IEditableCollectionView.CancelEdit%2A>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="NewItemPlaceholderPosition">
<MemberSignature Language="C#" Value="public System.ComponentModel.NewItemPlaceholderPosition NewItemPlaceholderPosition { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.ComponentModel.NewItemPlaceholderPosition NewItemPlaceholderPosition" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.IEditableCollectionView.NewItemPlaceholderPosition" />
<MemberSignature Language="VB.NET" Value="Public Property NewItemPlaceholderPosition As NewItemPlaceholderPosition" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ComponentModel::NewItemPlaceholderPosition NewItemPlaceholderPosition { System::ComponentModel::NewItemPlaceholderPosition get(); void set(System::ComponentModel::NewItemPlaceholderPosition value); };" />
<MemberSignature Language="F#" Value="member this.NewItemPlaceholderPosition : System.ComponentModel.NewItemPlaceholderPosition with get, set" Usage="System.ComponentModel.IEditableCollectionView.NewItemPlaceholderPosition" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ComponentModel.NewItemPlaceholderPosition</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the position of the new item placeholder in the collection view.</summary>
<value>One of the enumeration values that specifies the position of the new item placeholder in the collection view.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public void Remove (object item);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Remove(object item) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.IEditableCollectionView.Remove(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub Remove (item As Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Remove(System::Object ^ item);" />
<MemberSignature Language="F#" Value="abstract member Remove : obj -&gt; unit" Usage="iEditableCollectionView.Remove item" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="item" Type="System.Object" />
</Parameters>
<Docs>
<param name="item">The item to remove.</param>
<summary>Removes the specified item from the collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If `item` is not in the collection, <xref:System.ComponentModel.IEditableCollectionView.Remove%2A> does nothing.
## Examples
The following example calls <xref:System.ComponentModel.IEditableCollectionView.CanRemove%2A> to check whether an item can be removed from the collection. If an item can be removed, the example prompts the user to confirm the action and calls <xref:System.ComponentModel.IEditableCollectionView.Remove%2A> if the user clicks **Yes**. For the entire sample, see [Changing a Collection by Using IEditableCollectionView Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Data%20Binding/EditingCollections).
[!code-csharp[EditingCollectionsSnippets#RemoveItem](~/samples/snippets/csharp/VS_Snippets_Wpf/EditingCollectionsSnippets/CSharp/Window1.xaml.cs#removeitem)]
[!code-vb[EditingCollectionsSnippets#RemoveItem](~/samples/snippets/visualbasic/VS_Snippets_Wpf/EditingCollectionsSnippets/visualbasic/window1.xaml.vb#removeitem)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RemoveAt">
<MemberSignature Language="C#" Value="public void RemoveAt (int index);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void RemoveAt(int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.IEditableCollectionView.RemoveAt(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub RemoveAt (index As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void RemoveAt(int index);" />
<MemberSignature Language="F#" Value="abstract member RemoveAt : int -&gt; unit" Usage="iEditableCollectionView.RemoveAt index" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The position of the item to remove.</param>
<summary>Removes the item at the specified position from the collection.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
`index` is relative to the collection view, not the collection. For example, if the collection has 10 items and the view has a <xref:System.ComponentModel.ICollectionView.Filter%2A> so that 7 items appear, the valid values of `index` are 0 through 6.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="index" /> is less than 0 or greater than the number of items in the collection view.</exception>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.