# Setting Values

## Content

There are four properties to set to control the currently selected number ([Value](/componentone/api/wpf/online-basiclibrary/dotnet-framework-api/C1.WPF.4.6.2/C1.WPF.C1NumericBox.Value.html)), how much that number changes when the **Up** or **Down** button is clicked at run-time ([Increment](/componentone/api/wpf/online-basiclibrary/dotnet-framework-api/C1.WPF.4.6.2/C1.WPF.C1NumericBox.Increment.html)), and the range of numbers that can be selected ([Minimum](/componentone/api/wpf/online-basiclibrary/dotnet-framework-api/C1.WPF.4.6.2/C1.WPF.C1NumericBox.Minimum.html) and [Maximum](/componentone/api/wpf/online-basiclibrary/dotnet-framework-api/C1.WPF.4.6.2/C1.WPF.C1NumericBox.Maximum.html)).

### Start Value

The [Value](/componentone/api/wpf/online-basiclibrary/dotnet-framework-api/C1.WPF.4.6.2/C1.WPF.C1NumericBox.Value.html) property determines the currently selected number. By default the **C1NumericBox** control starts with its **Value** set to 0 but you can customize this number at design time, in XAML, and in code.

**In XAML**

To set the **Value** property add **Value="123"** to the **\<c1:C1NumericBox>** tag so that it appears similar to the following:

```xml
<c1:C1NumericBox Name="C1NumericBox1" Value="123" />
```

**In Code**

To set the **Value** property add the following code to your project:

```vbnet
C1NumericBox1.Value = 123
```

```csharp
c1NumericBox1.Value = 123;
```

**At Design Time**

To set the **Value** property at run time, complete the following steps:

1. Click the **C1NumericBox** control once to select it.
2. Navigate to the **Properties** window, and enter a number, for example **"123"**, in the text box next to the **Value** property.

This will set the Value property to the number you chose.

### Increment Value

The [Increment](/componentone/api/wpf/online-basiclibrary/dotnet-framework-api/C1.WPF.4.6.2/C1.WPF.C1NumericBox.Increment.html) property determines by how much the **Value** property changes when the **Up** or **Down** button is clicked at run time. By default the **C1NumericBox** control starts with its **Increment** set to 1 but you can customize this number at design time, in XAML, and in code.

**In XAML**

To set the **Increment** property to 20 add **Increment="20"** to the **\<c1:C1NumericBox>** tag so that it appears similar to the following:

```xml
<c1:C1NumericBox Name="C1NumericBox1" Increment="20" />
```

**In Code**

To set the Increment property to 20 add the following code to your project:

```vbnet
C1NumericBox1.Increment = 20
```

```csharp
c1NumericBox1.Increment = 20;
```

**At Design Time**

To set the **Increment** property at run time, complete the following steps:

1. Click the **C1NumericBox** control once to select it.
2. Navigate to the **Properties** window, and enter a number, for example "20", in the text box next to the **Increment** property.

This will set the **Increment** property to the number you chose.

### Minimum and Maximum Values

You can use the [Minimum](/componentone/api/wpf/online-basiclibrary/dotnet-framework-api/C1.WPF.4.6.2/C1.WPF.C1NumericBox.Minimum.html) and [Maximum](/componentone/api/wpf/online-basiclibrary/dotnet-framework-api/C1.WPF.4.6.2/C1.WPF.C1NumericBox.Maximum.html) properties to set a numeric range that users are limited to at run time. If the **Minimum** and **Maximum** properties are set, users will not be able to pick a number smaller than the **Minimum** or larger than the **Maximum**.

**In XAML**

To set the **Minimum** and **Maximum** in XAML add **Maximum="500" Minimum="-500"** to the **\<c1:C1NumericBox>** tag so that it appears similar to the following:

```xml
<c1:C1NumericBox Name="C1NumericBox1" Maximum="500" Minimum="-500" />
```

**In Code**

To set the **Minimum** and **Maximum** add the following code to your project:

```vbnet
C1NumericBox1.Minimum = -500
C1NumericBox1.Maximum = 500
```

```csharp
c1NumericBox1.Minimum = -500;
c1NumericBox1.Maximum = 500;
```

**At Design Time**

To set the **Minimum** and **Maximum** at run time, complete the following steps:

1. Click the **C1NumericBox** control once to select it.
2. Navigate to the **Properties** window, and enter a number, for example **500**, next to the **Maximum** property.
3. In the **Properties** window, enter a number, for example **-500**, next to the **Minimum** property.

This will set **Minimum** and **Maximum** values.