WPF with buttons for increasing or decreasing a text entry box
introduction
In doing some of the PC, configuration parameters need to use a type of control is worth the increase or decrease in the configuration. This paper describes the case which have been used in the development of WPF controls --xceed.ToolKit of -UpDown controls (there are a lot more practical controls xceed in).
application
1. Import packages, package names are as follows:
SamOatesGames.ModernUI.Xceed.Toolkit
2. Introduction of namespaces in the xaml
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
3. Use
<Window x:Class="Deamon.View.Windows.SettingsWindow"
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:Deamon.View.Windows"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
Title="SettingsWindow" Height="450" Width="800">
<Grid>
<StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<Label Content="整数加减"
Margin="0,2,10,2"
Grid.Row="1"/>
<xctk:IntegerUpDown Value="10"
Margin="0,2"
ToolTip="整数Int类型"/>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<Label Content="日期加减"
Margin="0,2,10,2"
Grid.Row="1"/>
<xctk:DateTimeUpDown
Margin="0,2"
ToolTip="日期DateTime类型"/>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<Label Content="浮点数加减"
Margin="0,2,10,2"
Grid.Row="1"/>
<xctk:DoubleUpDown Value="25.1"
Margin="0,2"
ToolTip="浮点数Double"/>
</StackPanel>
</StackPanel>
</Grid>
</Window>
The effect is as follows:
to sum up
These are just simple use of such controls, Xceed there are a lot of controls is very practical. If you are willing to take the time to study and learn, your progress will be enormous. Master, self-cultivation by country (a) person.
Over
Every record bits and pieces ... one small step way of life ...