# Setting the Distance Between the Selected Item and Side Items

## Content

The **SelectedItemDistance** property sets the distance between the selected item, which appears in the center of the control, and the items that are on either side of it (for more information, see the [Selected Item Distance](/componentone/docs/wpf/online-extended/CoverFlow2/CoverFlowFeatures/SelectedItemDistance2) topic). In this topic, you will set the **SelectedItemDistance** property to 0.4 so that the distance between the selected item and its side items is 4/10ths the size of the selected item.

**In Blend**

Complete the following steps:

1. Select the **C1CoverFlow** control.
2. In the Properties panel, set the **SelectedItemDistance** property to “0.4”.

**In XAML**

Add SelectedItemDistance=”0.4” to the `<c1ext:C1CoverFlow>` tag so that the markup resembles the following:

```xml
<c1ext:C1CoverFlow Margin="0,0,87,233" SelectedItemDistance=”0.4”>
```

**In Code**

Complete the following steps:

1. In XAML view, add “x:Name=”C1CoverFlow” to the `<c1ext:C1CoverFlow>` tag so that the control will have a unique identifier for you to call in code.
2. Add the following code beneath the InitializeComponent method:

```vbnet
C1CoverFlow1.SelectedItemDistance = 0.4
```

```csharp
C1CoverFlow1.SelectedItemDistance = 0.4;
```

3. Run the program.

![](https://cdn.mescius.io/document-site-files/images/babf1807-69aa-4d8a-96b6-d6c6d9325368/silverlightdocuments/documents/graphics/c1coverflow/check.png) **This Topic Illustrates the Following**:

The following image demonstrates a **C1CoverFlow** control with its **SelectedItemDistance** property set to **0.4**.

![](https://cdn.mescius.io/document-site-files/images/babf1807-69aa-4d8a-96b6-d6c6d9325368/silverlightdocuments/documents/graphics/c1coverflow/tbh/selecteditemdistance_final.png)