Back to Devexpress

How to: Customize a SpinEdit to Display Currency Values

wpf-10533-controls-and-libraries-data-editors-getting-started-how-to-customize-a-spinedit-to-display-currency-values.md

latest1.1 KB
Original Source

How to: Customize a SpinEdit to Display Currency Values

  • Aug 10, 2021

A SpinEdit editor allows you to operate with numeric values.

This document demonstrates how to create a SpinEdit control and customize it to show currency values.

Create a New Project and Add a SpinEdit

  1. Run MS Visual Studio.
  2. Create a new WPF Application project. For this, choose New Project on the File menu or press Ctrl+Shift+N , and then choose WPF Application.
  3. Add a SpinEdit component to the project.

Customize the SpinEdit

  1. Right click the SpinEdit and select Properties. Set the BaseEdit.DisplayFormatString property to ‘c2’ to display currency values.

  2. Set the SpinEdit.Increment property to 0.01 to specify a value by which the editor’s value changes each time the editor is spun.

  3. Run the application to see the result.