Loading...
Loading...
Implements the Syncfusion WPF DomainUpDown (SfDomainUpDown) control for cycling through predefined item lists using spin buttons. Use this when adding domain selectors, item selectors with up/down buttons, or controls that navigate through collections using increment/decrement buttons in WPF applications. Covers item population, spin button alignment, styling, auto-reverse, and data binding with custom templates.
npx skill4agent add syncfusion/wpf-ui-components-skills syncfusion-wpf-domain-updownSfDomainUpDownItemsSourceSyncfusion.SfInput.WPFSyncfusion.SfShared.WPFValueItemsSourceContentTemplateSpinButtonsAlignmentAccentBrushUpDownStyle<Window xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Grid>
<syncfusion:SfDomainUpDown x:Name="domainUpDown"
Height="30"
Width="150"
Value="James">
<syncfusion:SfDomainUpDown.ItemsSource>
<x:Array Type="sys:String" xmlns:sys="clr-namespace:System;assembly=mscorlib">
<sys:String>Lucas</sys:String>
<sys:String>James</sys:String>
<sys:String>Jacob</sys:String>
<sys:String>Michael</sys:String>
</x:Array>
</syncfusion:SfDomainUpDown.ItemsSource>
</syncfusion:SfDomainUpDown>
</Grid>
</Window>using Syncfusion.Windows.Controls.Input;
SfDomainUpDown domainUpDown = new SfDomainUpDown();
domainUpDown.Height = 30;
domainUpDown.Width = 150;
domainUpDown.ItemsSource = new List<string> { "Lucas", "James", "Jacob", "Michael" };
domainUpDown.Value = "James";
this.Content = domainUpDown;public class Employee
{
public string Name { get; set; }
public string Email { get; set; }
}public class ViewModel
{
public List<Employee> Employees { get; set; }
public ViewModel()
{
Employees = new List<Employee>
{
new Employee { Name = "Lucas", Email = "lucas@syncfusion.com" },
new Employee { Name = "James", Email = "james@syncfusion.com" },
new Employee { Name = "Jacob", Email = "jacob@syncfusion.com" }
};
}
}<syncfusion:SfDomainUpDown x:Name="domainUpDown"
Width="200"
ItemsSource="{Binding Employees}">
<syncfusion:SfDomainUpDown.ContentTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" FontWeight="Bold" Margin="0,0,5,0"/>
<TextBlock Text="{Binding Email}" Foreground="Gray"/>
</StackPanel>
</DataTemplate>
</syncfusion:SfDomainUpDown.ContentTemplate>
</syncfusion:SfDomainUpDown>ItemsSourceValueItemsSourceContentTemplateUpDownStyleAutoReverse="True"| Property | Type | Description | When to Use |
|---|---|---|---|
| | Collection of items to display | Populate control with data |
| | Currently selected item | Get/set selected value |
| | Template for displaying items | Customize item appearance |
| | Position of spin buttons (Left, Right, Both) | Control button placement |
| | Color for control hotspots | Theme customization |
| | Enable/disable spin transitions | Control animation behavior |
| | Enable cycling from max to min | Continuous list navigation |
| | Custom style for up/down buttons | Advanced button styling |
<syncfusion:SfDomainUpDown AutoReverse="True" Value="Monday">
<syncfusion:SfDomainUpDown.ItemsSource>
<x:Array Type="sys:String">
<sys:String>Monday</sys:String>
<sys:String>Tuesday</sys:String>
<!-- ... other days ... -->
</x:Array>
</syncfusion:SfDomainUpDown.ItemsSource>
</syncfusion:SfDomainUpDown><syncfusion:SfDomainUpDown ItemsSource="{Binding Employees}">
<syncfusion:SfDomainUpDown.ContentTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</syncfusion:SfDomainUpDown.ContentTemplate>
</syncfusion:SfDomainUpDown>domainUpDown.ItemsSource = new List<string> { "Draft", "Pending", "Approved", "Rejected" };
domainUpDown.Value = "Draft";<syncfusion:SfDomainUpDown SpinButtonsAlignment="Both"
ItemsSource="{Binding Items}"/>ItemsSourceContentTemplateValueItemsSourceAccentBrushUpDownStyleContentTemplateItemsSourceValueEnableSpinAnimation="False"