# Selection

The selection feature allows you to highlight a step based on the current progress.

The selection is changed when you click on a step in the UI, or set the **SelectedItem** or **SelectedIndex** properties of RadStepProgressBar. By default this will highlight also the steps that are previous to the selected step.

```XAML
<telerik:RadStepProgressBar SelectedIndex="1">
    <telerik:RadStepProgressBarItem Content="Step 1" />
    <telerik:RadStepProgressBarItem Content="Step 2" />
    <telerik:RadStepProgressBarItem Content="Step 3" />
</telerik:RadStepProgressBar>
```

> caption StepProgressBar selection

![WPF RadStepProgressBar Selection](https://www.telerik.com/products/wpf/documentation/assets/77c0a55f4c19f8e373c2eff67f71f462/stepprogressbar-selection-0.png)

Selecting a step will update the **OverallProgress** property of RadStepProgressBar which can be used to get the numeric progress value. The OverallProgress ranges between 0 and 100.

## Selected Item Status

The RadStepProgressBarItem has three states that can enter - **NotStarted**, **Indeterminate** and **Completed**. When you click onto a step item to select it, its status changes to Completed. The same status is applied to the previous steps. The different states display a different indicator inside the step shape.

> caption Step item statuses

![WPF RadStepProgressBar Selected Item Status](https://www.telerik.com/products/wpf/documentation/assets/16a191ef1672dc75a4980c599925ecad/stepprogressbar-selection-1.png)

To change the status that is applied to the selected item from Complete to another value - like NotStarted or Indeterminate - set the **SelectedItemStatus** property of RadStepProgressBar.

```XAML
<telerik:RadStepProgressBar SelectedItemStatus="Indeterminate" />
```

> caption Selected item status set to indeterminate

![WPF RadStepProgressBar Selected Item Status Set to Indeterminate](https://www.telerik.com/products/wpf/documentation/assets/a1b2455d74cb47bff4eda4204629e218/stepprogressbar-selection-2.png)

To prevent changing the status of the previous steps to Complete, set the **CompleteAllPreviousStepsOnSelection** property of RadStepProgressBar to **False**.

```XAML
<telerik:RadStepProgressBar CompleteAllPreviousStepsOnSelection="False"/>
```

> caption Disabled previous steps auto completion

![WPF RadStepProgressBar Disabled Previous Steps Auto Completion](https://www.telerik.com/products/wpf/documentation/assets/250a0dabe2560284e4913fcaeed978e3/stepprogressbar-selection-3.png)

The current state of a RadStepProgressBarItem can be got via its **Status** property.

## Prevent User Selection

To prevent changing the selection whenever a step item is clicked, set the **CanUserSelect** property of RadStepProgressBar to **False**.

```XAML
<telerik:RadStepProgressBar CanUserSelect="False"/>
```

## Progress Animation Duration

The step selection change reflects to the OverallProgress property of the control which fills the track visual with color. The color fill is done using an animation, that runs for 1 second by default. The animation duration can be changed with the **AnimationDuration** property of RadStepProgressBar. The property value represents the duration in seconds.

```XAML
<telerik:RadStepProgressBar AnimationDuration="3"/>
```

To disable the animation, you can set the AnimationDuration to 0.

## See Also

* [Getting Started](https://www.telerik.com/products/wpf/documentation/controls/radstepprogressbar/getting-started)
* [Visual Structure](https://www.telerik.com/products/wpf/documentation/controls/radstepprogressbar/visual-structure)
* [Data Binding](https://www.telerik.com/products/wpf/documentation/controls/radstepprogressbar/data-binding)
