Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DXCollectionView.ShowDetailForm(Int32, Boolean) Method

Invokes a view form for a CollectionView item with the specified handle.

Namespace: DevExpress.Maui.CollectionView

Assembly: DevExpress.Maui.CollectionView.dll

NuGet Package: DevExpress.Maui.CollectionView

#Declaration

C#
public void ShowDetailForm(
    int itemHandle,
    bool animated = false
)

#Parameters

Name Type Description
itemHandle Int32

The edit item handle.

#Optional Parameters

Name Type Default Description
animated Boolean False

Specifies whether animation effects apply to the edit form when it is invoked.

#Remarks

The following code invokes the default View form for a tapped CollectionView item:

private void collectionView_Tap(object sender, DevExpress.Maui.CollectionView.CollectionViewGestureEventArgs e) {
    collectionView.ShowDetailForm(e.ItemHandle);
}
Show implementation details
   <ContentPage.BindingContext>
       <local:ViewModel/>
   </ContentPage.BindingContext>
       <dxcv:DXCollectionView x:Name="collectionView"
                          Tap="collectionView_Tap"
                          ItemsSource="{Binding Data}">
           <!--...-->
       </dxcv:DXCollectionView>
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace CollectionViewExample {
   public class Contact {
       public string Name { get; set; }
       public Contact(string name, string phone) {
           Name = name;
           Phone = phone;
       }
       public Contact() {
           Name = "";
           Phone = "";
       }
       public string Phone { get; set; }
   }
   public class ViewModel : INotifyPropertyChanged {
       public List<Contact> Data { get; }
       public ViewModel() {
           Data = new List<Contact>() {
               new Contact("Nancy Davolio", "(206) 555-9857"),
               new Contact("Andrew Fuller", "(206) 555-9482"),
               new Contact("Janet Leverling", "(206) 555-3412"),
               new Contact("Margaret Peacock", "(206) 555-8122"),
               new Contact("Steven Buchanan", "(71) 555-4848"),
               new Contact("Michael Suyama", "(71) 555-7773"),
               new Contact("Robert King", "(71) 555-5598"),
               new Contact("Laura Callahan", "(206) 555-1189"),
               new Contact("Anne Dodsworth", "(71) 555-4444"),
           };
       }
       public event PropertyChangedEventHandler PropertyChanged;
       private void OnPropertyChanged([CallerMemberName] string propertyName = "") {
           PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
       }
   }
}

For more information, refer to the following topic: Show Built-In Forms to Display, Create, and Edit Items.

See Also