c# – Is there any component that replaces SpinEdit in Windows Forms in WPF?

Question:

I prefer open source components, or if possible a form of adaptation, as I haven't found any SpinEdit or similar in WPF.

Answer:

Install the package via nuget Extended.Wpf.Toolkit which it offers a SingleUpDown component. After it has been installed configure it as follows:

Add configuration:

xmlns:wpfTool="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"

in the code:

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApplication1"
        xmlns:wpfTool="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <wpfTool:SingleUpDown Value="1564" Margin="39,70,311,223"
                              RenderTransformOrigin="0.5,0.5" >
            <wpfTool:SingleUpDown.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform Angle="0.309"/>
                    <TranslateTransform/>
                </TransformGroup>
            </wpfTool:SingleUpDown.RenderTransform>
        </wpfTool:SingleUpDown>
    </Grid>
</Window>
Scroll to Top