Skip to content

Commit 27d163d

Browse files
authored
Merge pull request #2 from SyncfusionExamples/995186-Update-readme
995186-Resolve the ReadMe file length issue in this sample repository
2 parents fc17a04 + c605686 commit 27d163d

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

README.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,40 @@
1-
# WPF-GettingStarted-Databinding
2-
This repository contains that sample that how to add the item using binding concept of WPF SfDomainUpDown control.
1+
# WPF Domain UpDown (SfDomainUpDown) – Getting Started and Data Binding
2+
3+
This sample shows how to use the Syncfusion WPF SfDomainUpDown control to build intuitive, keyboard-friendly pickers for discrete values with full MVVM-friendly data binding. It demonstrates binding to collections, selecting and editing values, wrap/spin behavior, templates for complex items, theming, and best practices for a production-ready experience.
4+
5+
## Features
6+
- Bind to IEnumerable/ObservableCollection for dynamic item lists
7+
- Select values via spin buttons, keyboard, and mouse wheel
8+
- Optional text editing with parsing and read-only modes
9+
- Wrap behavior when spinning past the first/last item
10+
- DisplayMemberPath/ItemTemplate for rich item visualization
11+
- SelectedItem/SelectedIndex two-way binding for MVVM
12+
- Watermark/placeholder and null-value handling
13+
- Theming via Syncfusion built-in visual styles
14+
15+
## Getting Started
16+
1. Create or open a WPF project in Visual Studio (e.g., SfDomainUpDown-GettingStarted).
17+
2. Install the NuGet package: Syncfusion.SfInput.WPF.
18+
- In Visual Studio: Tools > NuGet Package Manager > Manage NuGet Packages for Solution… > Browse “Syncfusion.SfInput.WPF” > Install.
19+
3. Add the Syncfusion XML namespace in your XAML root:
20+
- xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
21+
4. Place an SfDomainUpDown in your Window/Page and bind it to your ViewModel:
22+
- ItemsSource: collection of items to display
23+
- SelectedItem or SelectedIndex: current selection
24+
- DisplayMemberPath or ItemTemplate: how items are shown
25+
- Optional behavior: IsWrapEnabled, IsEditable, SpinButtonAlignment, Watermark
26+
5. Apply a theme if desired using Syncfusion SkinStorage (VisualStyle):
27+
- syncfusion:SkinStorage.VisualStyle="Office2019Colorful" (or any preferred theme)
28+
29+
## Usage Tips
30+
- For complex objects, prefer ItemTemplate or DisplayMemberPath for clear display.
31+
- Use two-way binding on SelectedItem/SelectedIndex to keep the ViewModel in sync.
32+
- Enable IsWrapEnabled for continuous cycling through items.
33+
- Set IsEditable to allow users to type values and handle parsing/validation as needed.
34+
- Align spin buttons via SpinButtonAlignment to suit your layout.
35+
- Provide a Watermark to guide users when no value is selected.
36+
- Handle SelectionChanged to react to user choices (e.g., filtering or commands).
37+
38+
## About the Sample
39+
This sample focuses on the essentials for data binding with SfDomainUpDown: wiring ItemsSource, choosing a selection model, configuring spin and wrap behavior, and theming. Extend it by adding validation rules, custom parsing, commands, and richer item templates to match your application’s workflow and branding.
40+

0 commit comments

Comments
 (0)