Skip to content

Repository files navigation

WPF SlideView – Display a Horizontal List of Cards with Swipe Navigation

This example uses the SlideView control to display a scrollable horizontal list of items. Each item is rendered as a content card with user-defined templates.

Group Bar Items with Separators

Use the SlideView control when you need to:

  • Display detailed information for data items in a focused, single-item view.
  • Create a modern, user-friendly interface with swipe-style navigation.

Implementation Details

Data Structure

The data source, which contains a list of Employee objects, is exposed by the EmployeesData view model through the DataSource property. The Employee class exposes employee-related properties (such as FullName, Photo, JobTitle, EmailAddress, and City). Images are stored as byte arrays and converted to BitmapImage objects at runtime.

publicclassEmployee{publicstringFirstName{get;set;}publicstringLastName{get;set;}publicstringFullName=>FirstName+" "+LastName;publicstringJobTitle{get;set;}publicstringEmailAddress{get;set;}publicstringCity{get;set;}publicbyte[]ImageData{get;set;}[XmlIgnore]publicBitmapImagePhoto=>imageSource??=LoadImage();BitmapImageLoadImage(){varstream=newMemoryStream(ImageData);varimage=newBitmapImage();image.BeginInit();image.StreamSource=stream;image.EndInit();returnimage;}}

Templates

The following code example defines two templates:

<DataTemplatex:Key="ItemHeaderTemplate">
<TextBlockText="{Binding FirstName}" />
</DataTemplate>
<DataTemplatex:Key="ItemContentTemplate">
<Grid>
<!-- Photo, FullName, JobTitle, etc. -->
</Grid>
</DataTemplate>

Slide View Configuration

<dxwui:SlideViewHeader="Slide View"ItemsSource="{Binding DataSource}"ItemHeaderTemplate="{StaticResource ItemHeaderTemplate}"ItemTemplate="{StaticResource ItemContentTemplate}" />

Files to Review

Documentation

More Examples

Does This Example Address Your Development Requirements/Objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Creates a WPF SlideView control and binds it to a data source to display a horizontal list of items with slide navigation.

Topics

Resources

Stars

0 stars

Watchers

53 watching

Forks

Used by

Contributors

Languages