### Complete Task Management Example with SwipeContainer
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/swipecontainer.md
A comprehensive example demonstrating the SwipeContainer within a DXCollectionView for task management. It includes item views, start and end swipe items with commands, and conditional styling.
```csharp
```
--------------------------------
### Complete DXCollectionView Example with Sorting, Grouping, and Filtering
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/sort-and-group-descriptions.md
A comprehensive example demonstrating how to set up ItemsSource, FilterExpression, multi-level sorting, grouping by a specific field, and defining custom templates for group headers and items.
```csharp
```
--------------------------------
### DXImage Examples
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
Demonstrates how to display images with tint color, as circular avatars, and with aspect fill.
```csharp
```
--------------------------------
### Complete ViewModel Example with DXObservableObject and RelayCommand
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/bindablebase-dxobservableobject.md
This example demonstrates a comprehensive ViewModel using DXObservableObject and various RelayCommand attributes. It includes observable properties, basic commands, commands with can-execute logic, and asynchronous command execution.
```csharp
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using DevExpress.Maui.Mvvm;
using System.Collections.ObjectModel;
namespace MyApp.ViewModels
{
public partial class ContactsViewModel : DXObservableObject
{
// Observable property - generates ContactsProperty and OnContactsChanged
[ObservableProperty]
ObservableCollection contacts = new();
// Observable property
[ObservableProperty]
Contact selectedContact;
// Observable property
[ObservableProperty]
bool isLoading;
// Relay command - generates LoadContactsCommand
[RelayCommand]
async Task LoadContacts()
{
IsLoading = true;
try
{
var data = await LoadContactsFromService();
Contacts.Clear();
foreach (var contact in data)
Contacts.Add(contact);
}
finally
{
IsLoading = false;
}
}
// Relay command with can-execute logic
[RelayCommand(CanExecute = nameof(CanDeleteContact))]
void DeleteContact(Contact contact)
{
Contacts.Remove(contact);
}
private bool CanDeleteContact()
{
return SelectedContact != null;
}
// Relay command with async execution
[RelayCommand]
async Task SaveContactAsync(Contact contact)
{
IsLoading = true;
try
{
await SaveContactToService(contact);
}
finally
{
IsLoading = false;
}
}
private async Task> LoadContactsFromService()
{
// Implementation
return new List();
}
private async Task SaveContactToService(Contact contact)
{
// Implementation
}
}
}
```
--------------------------------
### DXBorder Usage Example
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
A comprehensive example demonstrating the usage of DXBorder with rounded corners, background color, no border, margin, and a shadow effect. Includes nested content.
```xaml
```
--------------------------------
### DXStackLayout Usage Example
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
Demonstrates how to use DXStackLayout with various properties in XAML.
```APIDOC
## Usage Example
```csharp
```
```
--------------------------------
### Basic SwipeContainer Usage in DXCollectionView
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/swipecontainer.md
This example demonstrates how to integrate SwipeContainer within a DXCollectionView to provide swipeable actions for each item. It configures start and end swipe items with captions, background colors, images, and commands.
```XAML
```
--------------------------------
### Complete Filtering UI Form Example
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/filter-controls.md
An example demonstrating a comprehensive filtering UI form using various DevExpress MAUI filter controls. This includes city selection, status filtering, property type, price ranges, square footage, bedrooms, year built, and garage availability.
```csharp
```
--------------------------------
### DXDockLayout Constructor
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
Creates a new instance of DXDockLayout. No specific setup is required beyond instantiation.
```csharp
public DXDockLayout()
```
--------------------------------
### Get and Set SelectedItem
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Demonstrates how to get the currently selected item and how to programmatically set a specific item as selected in a single-selection mode.
```csharp
var selected = collectionView.SelectedItem;
collectionView.SelectedItem = contacts[0];
```
--------------------------------
### PredefinedFilterCheckedChipGroupItem Example
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/filter-controls.md
Demonstrates how to use PredefinedFilterCheckedChipGroupItem to create a filter for price ranges with predefined options and value counts.
```csharp
```
--------------------------------
### DXImage Usage
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
Examples of how to use the DXImage control for displaying icons, avatars, and full-size images with various configurations.
```APIDOC
## DXImage
### Description
Used for displaying images, icons, and avatars with customizable tint colors and aspect ratios.
### Usage Examples
#### Icon with tint color
```csharp
```
#### Circular avatar
```csharp
```
#### Full-size image with aspect fill
```csharp
```
```
--------------------------------
### BindableBase Constructor
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/bindablebase-dxobservableobject.md
Creates a new instance of the BindableBase class. No specific setup is required.
```csharp
public BindableBase()
```
--------------------------------
### Basic ViewModel with DXObservableObject
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/INDEX.md
Demonstrates a basic ViewModel setup using DXObservableObject from DevExpress.Maui.Mvvm. Includes observable properties and relay commands.
```csharp
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using DevExpress.Maui.Mvvm;
public partial class MyViewModel : DXObservableObject
{
[ObservableProperty]
ObservableCollection items = new();
[RelayCommand]
async Task LoadItems()
{
// Load data
}
}
```
--------------------------------
### DXButton Usage Examples
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
Demonstrates different configurations for DXButton, including primary action, secondary/transparent, and icon-only buttons. Ensure the necessary theme resources are available.
```csharp
```
--------------------------------
### Usage Example: Sorting CollectionView Items
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/sort-and-group-descriptions.md
Demonstrates how to apply sorting to a DXCollectionView by defining SortDescription instances within its SortDescriptions collection. This example sorts contacts by name in ascending order.
```xaml
```
--------------------------------
### Handle CollectionView Selection Changed Event
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/types.md
Example of how to handle the SelectionChanged event for DXCollectionView to get the count of newly selected items.
```csharp
private void OnSelectionChanged(object sender, CollectionViewSelectionChangedEventArgs e)
{
var selectedCount = e.NewSelection.Count;
}
```
--------------------------------
### Contact Class Implementation
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/bindablebase-dxobservableobject.md
Example implementation of a Contact class inheriting from BindableBase, demonstrating observable properties for FirstName, LastName, and Email.
```csharp
using DevExpress.Maui.Core;
public class Contact : BindableBase
{
private string firstName;
private string lastName;
private string email;
public string FirstName
{
get => firstName;
set => SetProperty(ref firstName, value);
}
public string LastName
{
get => lastName;
set => SetProperty(ref lastName, value);
}
public string Email
{
get => email;
set => SetProperty(ref email, value);
}
public string FullName => $"{FirstName} {LastName}";
}
```
--------------------------------
### Load Raw Asset at Runtime using Essentials
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/CS/CrudOperations/Resources/Raw/AboutAssets.txt
This C# code demonstrates how to load a raw asset file (e.g., AboutAssets.txt) that was deployed with the application package. It uses FileSystem.OpenAppPackageFileAsync to get a stream to the file and then reads its contents.
```csharp
async Task LoadMauiAsset()
{
using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
using var reader = new StreamReader(stream);
var contents = reader.ReadToEnd();
}
```
--------------------------------
### FilterCheckItem Usage Example
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/filter-controls.md
Combines Text and FieldName properties for a checkbox filter. This example shows how to set both the display label and the data field for filtering.
```csharp
```
--------------------------------
### GroupDescription XAML Example
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/types.md
Example of how to define a GroupDescription in XAML to group items by the 'City' field with no interval and ascending sort order.
```xaml
```
--------------------------------
### Define Start Swipe Items for SwipeContainer
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/swipecontainer.md
Specifies the collection of swipe action items that appear when swiping from the start (left on LTR languages). Each item can have a caption, image, background color, and command.
```xaml
```
--------------------------------
### dxcollectionview.md
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/CONTENTS.txt
Main control documentation for DevExpress Collection View, including properties, events, and usage examples.
```APIDOC
## dxcollectionview.md
### Description
This document details the main DevExpress Collection View control, covering its properties, events, and essential usage patterns for MAUI applications.
### API Reference
This section would typically list properties, methods, and events. Refer to the `dxcollectionview.md` file for specific details.
### Usage
Provides guidance on how to integrate and use the Collection View control within your MAUI application.
```
--------------------------------
### DXCollectionView with Grouping and Templates
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/sort-and-group-descriptions.md
Demonstrates how to implement grouping in a DXCollectionView by defining a GroupDescription and providing templates for group headers and items. The example groups contacts by 'Name' alphabetically.
```xml
```
--------------------------------
### DXStackLayout Usage Example
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
Demonstrates a typical usage of DXStackLayout for creating a form layout. It configures orientation, spacing, and padding, and includes labels and entry fields.
```xml
```
--------------------------------
### Initialize DXCollectionView with Data and Selection
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Initializes a DXCollectionView instance, setting its ItemsSource to a data collection and configuring the SelectionMode. This is a common setup for displaying data with selection capabilities.
```csharp
var collectionView = new DXCollectionView
{
ItemsSource = contacts,
SelectionMode = SelectionMode.Single
};
```
--------------------------------
### FilterItem Data Model and ViewModel Setup
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/CS/FilterChips/Readme.md
Define the FilterItem class with DisplayText and Filter properties. Initialize the PredefinedFilters collection with filter criteria using Criteria Language Syntax.
```csharp
public class MainViewModel : BindableBase {
string filter;
public ObservableCollection PredefinedFilters {
get;
set;
}
public BindingList SelectedFilters {
get;
set;
}
public MainViewModel() {
SelectedFilters = new BindingList();
PredefinedFilters = new ObservableCollection() {
new FilterItem(){ DisplayText= "Today", Filter = "IsOutlookIntervalToday([CreatedDate])" },
new FilterItem(){ DisplayText= "Last Week", Filter = "IsThisWeek([CreatedDate])" },
new FilterItem(){ DisplayText= "Drafts", Filter = "[IsDraft] == True" },
new FilterItem(){ DisplayText= "< $1000", Filter = "[Price] < 1000" },
new FilterItem(){ DisplayText= "> $4000", Filter = "[Price] > 4000" },
};
}
```
--------------------------------
### SelectionMode Property
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Gets or sets the item selection mode. Possible values are `None`, `Single`, or `Multiple`.
```APIDOC
## SelectionMode
### Description
Gets or sets the item selection mode: `None`, `Single`, or `Multiple`.
### Type
`SelectionMode` enum
### Default
`None`
### Values
| Value |
|-------|
| `None` | No item selection allowed |
| `Single` | Only one item can be selected at a time |
| `Multiple` | Multiple items can be selected simultaneously |
### Example
```csharp
collectionView.SelectionMode = SelectionMode.Multiple;
```
```
--------------------------------
### iOS Platform-Specific Setup for DevExpress MAUI
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/configuration.md
Configure the MAUI application for iOS by including the `UseDevExpress()` extension method and optionally configuring fonts.
```csharp
using DevExpress.Maui;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder()
.UseMauiApp()
.UseDevExpress();
#if IOS
builder.ConfigureFonts(fonts =>
{
fonts.AddFont("SF-Pro-Display-Medium.otf", "SFProDisplay");
});
#endif
return builder.Build();
}
}
```
--------------------------------
### ItemSeparatorCapMargin Property
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Gets or sets the margin at the start and end of the separator line. This property accepts a `Thickness` value.
```APIDOC
## ItemSeparatorCapMargin
### Description
Gets or sets the margin at the start and end of the separator line.
### Type
`Thickness`
### Default
`0`
### Example
```csharp
```
```
--------------------------------
### Initialize DXImage
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
Creates a new instance of the DXImage control.
```csharp
public DXImage()
```
--------------------------------
### Configure Grouping for DXCollectionView
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/configuration.md
Define grouping behavior using GroupDescription with FieldName, GroupInterval, and SortOrder. This example groups by Category with no interval and ascending sort.
```csharp
```
--------------------------------
### FilterNumericRangeItem Usage Example
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/filter-controls.md
Provides examples of using FilterNumericRangeItem to filter by 'Square Feet' and 'Year Built'.
```csharp
```
--------------------------------
### ViewModel with ObservableCollection
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/types.md
Example of a ViewModel using ObservableCollection to manage a list of contacts. ObservableCollection implements INotifyCollectionChanged, enabling UI updates when the collection changes.
```csharp
public class ViewModel
{
public ObservableCollection Contacts { get; } = new();
}
```
--------------------------------
### Configure SwipeContainerItem in XAML
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/types.md
Example of how to configure a SwipeContainerItem in XAML. This snippet shows setting the caption, image, background color, and command for a swipe action.
```xaml
```
--------------------------------
### Cancel Filtering Form Example C#
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/types.md
Example of how to cancel the display of the filtering form in the FilteringUIFormShowing event handler.
```csharp
private void OnFilteringUIFormShowing(object sender, FilteringUIFormShowingEventArgs e)
{
if (SomeCondition())
{
e.Cancel = true;
}
}
```
--------------------------------
### Configure FilterCheckedChipGroupItem ShowValuesOutOfFilter
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/filter-controls.md
Example of setting the ShowValuesOutOfFilter property to true for a FilterCheckedChipGroupItem. This controls whether to display values not matching the current filter.
```csharp
```
--------------------------------
### DXDockLayout with Docked Elements
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
Use DXDockLayout to arrange UI elements with specific docking positions (Top, Bottom, Fill). This example shows an image docked to the top, content filling the middle, and buttons docked to the bottom.
```csharp
```
--------------------------------
### Basic List Display with DXCollectionView
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Demonstrates how to display a simple list of items using DXCollectionView. Ensure the ItemsSource is bound to a collection of data.
```csharp
```
--------------------------------
### Styling DXButton Icons in DXPopup
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/CS/ContextMenuPopup/README.md
Apply a style to DXButton elements to customize their icon color. This example uses a static resource for the color.
```xaml
```
--------------------------------
### RelayCommand for Item Tapped Event
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/types.md
An example using the RelayCommand attribute from the MVVM Community Toolkit to handle item tap events in a collection view. This simplifies command implementation for common MVVM scenarios.
```csharp
[RelayCommand]
public void ItemTapped(Contact contact)
{
Navigation.PushAsync(new ContactDetailPage { BindingContext = contact });
}
```
--------------------------------
### DXImage Constructor
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
Creates a new instance of the DXImage control.
```APIDOC
## DXImage Constructor
### Description
Creates a new instance of the DXImage control.
### Method
`public DXImage()`
```
--------------------------------
### SortDescription.FieldName
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/sort-and-group-descriptions.md
Gets or sets the name of the property/field to sort by. This is a string property.
```APIDOC
## SortDescription.FieldName
### Description
Gets or sets the name of the property/field to sort by.
### Property
`FieldName`
### Type
`string`
### Default Value
`null`
### Example
```csharp
```
```
--------------------------------
### GroupDescription.SortOrder Property
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/sort-and-group-descriptions.md
Gets or sets the sort order for groups, which can be Ascending or Descending.
```APIDOC
## SortOrder
### Description
Gets or sets the sort order for groups: `Ascending` or `Descending`.
### Type
`SortOrder` enum
### Default Value
`Ascending`
### Example
```csharp
```
```
--------------------------------
### bindablebase-dxobservableobject.md
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/CONTENTS.txt
Documentation for MVVM base classes BindableBase and DxObservableObject.
```APIDOC
## bindablebase-dxobservableobject.md
### Description
This document details the MVVM base classes `BindableBase` and `DxObservableObject`, which are fundamental for implementing the Model-View-ViewModel pattern with DevExpress controls.
### API Reference
Information on the properties, methods, and events of `BindableBase` and `DxObservableObject`, including support for property change notifications.
### Usage
Guidance on inheriting from these base classes to create observable view models and bind them to the UI.
```
--------------------------------
### IsPullToRefreshEnabled Property
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Gets or sets whether pull-to-refresh functionality is enabled. This property is a `bool`.
```APIDOC
## IsPullToRefreshEnabled
### Description
Gets or sets whether pull-to-refresh functionality is enabled.
### Type
`bool`
### Default
`false`
### Example
```csharp
```
```
--------------------------------
### Create DXStackLayout Instance
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
Instantiates a new DXStackLayout object. This is the basic constructor for the layout control.
```csharp
public DXStackLayout()
```
--------------------------------
### GroupDescription.FieldName Property
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/sort-and-group-descriptions.md
Gets or sets the name of the property or field to group by. This is a string value.
```APIDOC
## FieldName
### Description
Gets or sets the name of the property/field to group by.
### Type
`string`
### Default Value
`null`
### Example
```csharp
```
```
--------------------------------
### SortDescription.SortOrder
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/sort-and-group-descriptions.md
Gets or sets the sort direction, which can be Ascending or Descending. This property uses the SortOrder enum.
```APIDOC
## SortDescription.SortOrder
### Description
Gets or sets the sort direction: `Ascending` or `Descending`.
### Property
`SortOrder`
### Type
`SortOrder` enum
### Default Value
`Ascending`
### Enum Values
- `Ascending`: Sort from lowest to highest (A-Z, 0-9)
- `Descending`: Sort from highest to lowest (Z-A, 9-0)
### Example
```csharp
```
```
--------------------------------
### DXCollectionView with Sorting and Grouping
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Shows how to implement sorting and grouping for items in DXCollectionView. Configure SortDescription and GroupDescription for desired order and categorization.
```csharp
```
--------------------------------
### ItemSpanSpacing Property
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Gets or sets the spacing between columns in grid layout. This property accepts a `double` value.
```APIDOC
## ItemSpanSpacing
### Description
Gets or sets the spacing between columns in grid layout.
### Type
`double`
### Default
`0`
### Example
```csharp
```
```
--------------------------------
### Load Raw Asset from App Package
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/CS/CollectionViewSwipe/Resources/Raw/AboutAssets.txt
Access deployed raw assets at runtime using FileSystem.OpenAppPackageFileAsync. This method returns a stream to the file, which can then be read using a StreamReader.
```csharp
async Task LoadMauiAsset()
{
using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
using var reader = new StreamReader(stream);
var contents = reader.ReadToEnd();
}
```
--------------------------------
### BindableBase Constructor
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/bindablebase-dxobservableobject.md
Creates a new instance of the BindableBase class.
```APIDOC
## BindableBase Constructor
### Description
Creates a new instance of the BindableBase class.
### Method
Constructor
### Endpoint
N/A
### Parameters
None
### Request Example
```csharp
var bindableBase = new BindableBase();
```
### Response
N/A
```
--------------------------------
### ItemSeparatorColor Property
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Gets or sets the color of item separator lines. This property accepts a `Color` value.
```APIDOC
## ItemSeparatorColor
### Description
Gets or sets the color of item separator lines.
### Type
`Color`
### Default
`Colors.Gray`
### Example
```csharp
```
```
--------------------------------
### Initialize CollectionView in Code-Behind
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/INDEX.md
Initialize a DXCollectionView in C# code-behind, setting its ItemsSource and SelectionMode.
```csharp
// Code-behind
var collectionView = new DXCollectionView
{
ItemsSource = items,
SelectionMode = SelectionMode.Single
};
```
--------------------------------
### ItemSeparatorThickness Property
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Gets or sets the thickness of the separator line between items. This property accepts a `double` value.
```APIDOC
## ItemSeparatorThickness
### Description
Gets or sets the thickness of the separator line between items.
### Type
`double`
### Default
`0`
### Example
```csharp
```
```
--------------------------------
### ItemSpacing Property
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Gets or sets the spacing between items in the collection view. This property accepts a `double` value.
```APIDOC
## ItemSpacing
### Description
Gets or sets the spacing between items in the collection view.
### Type
`double`
### Default
`0`
### Example
```csharp
```
```
--------------------------------
### DXButton Constructor
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/layout-controls.md
Creates a new instance of the DXButton control.
```APIDOC
## DXButton Constructor
### Description
Initializes a new instance of the `DXButton` class.
### Method Signature
```csharp
public DXButton()
```
```
--------------------------------
### Include Raw Assets in .csproj
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/CS/CollectionViewSwipe/Resources/Raw/AboutAssets.txt
Use the MauiAsset Include directive in your .csproj file to specify raw assets for deployment. The LogicalName ensures the asset is placed in the correct relative path within the app package.
```xml
```
--------------------------------
### SelectedItems Property
Source: https://github.com/devexpress-examples/maui-collection-view/blob/24.2.3+/_autodocs/api-reference/dxcollectionview.md
Gets or sets the list of selected items. This property is used when `SelectionMode` is set to `Multiple`.
```APIDOC
## SelectedItems
### Description
Gets or sets the list of selected items (used with `SelectionMode.Multiple`).
### Type
`IList`
### Default
`new List