Back to Devexpress

How To: Create a SlideView and Populate It with Data

wpf-15027-controls-and-libraries-windows-modern-ui-examples-how-to-create-a-slideview-and-populate-it-with-data.md

latest2.0 KB
Original Source

How To: Create a SlideView and Populate It with Data

  • Jul 29, 2025
  • 3 minutes to read

This example describes how to create a Slide View, bind it to data, and use templates to visualize its items. The last section of this article contains the complete example code.

Steps

  1. Start Visual Studio and create a new WPF project by selecting FILE | New | Project… in the main menu. In the New Project window that is invoked, select WPF Application and change the name to SlideViewSample.

  2. Change the main window’s theme to Office 2013. To do so, reference the DevExpress Core namespace and use the ThemeManager.

  3. Find the SlideView control in the Toolbox and drop it onto the form. Once added, the SlideView automatically generates two SlideViewItem objects. These items are not necessary, so remove them from the XAML mark-up.

  4. Define the data source in XAML.

  5. Now create two DataTemplate objects in the Resources section. These data templates will specify how items and their headers within our SlideView should appear.

  6. Finally, assign the data templates to the SlideView’s ItemTemplate and ItemHeaderTemplate properties. Also set the data source for the SlideView via the ItemsSource property.

  7. You can now launch the application to see the results. Remember to include the code for classes encapsulating the data source, which can be found below. The .XML file that stores employee data is also listed later in this example. Include this file in your project and set its BuildAction property to EmbeddedResource.

Complete Code

This example demonstrates how to create a SlideView , bind it to data and use templates to visualize its items.

View Example