# Looping Media Files

## Content

By default, the [C1MediaPlayer](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaPlayer.html) control will automatically run through its item list only once. But if you'd prefer to have the player continuously loop through its items, you can set the [C1MediaPlayer.IsLooping](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaPlayer.IsLooping.html) property to **True**.

**At Design Time**

To turn on looping, complete the following steps:

1. Click the **C1MediaPlayer** control once to select it.
2. In the **Properties** window(or **Properties** panel in Blend), locate the **IsLooping** check box and select it.

**In XAML**

To turn on looping, add **IsLooping="True"** to the *\<c1mediaplayer:C1MediaPlayer>* tag so that the markup resembles the following:

```auto
<c1mediaplayer:C1MediaPlayer Name="C1MediaPlayer1" IsLooping="True">
```

**In Code**

To turn on looping, complete the following steps:

1. Open the Window1.xaml.cs page.
2. Add **x:Name="C1MediaPlayer1"** to the *\<c1ext:C1MediaPlayer>* tag so that the control will have a unique identifier for you to call in code.
3. Place the following code beneath the **InitializeComponent()** method:

    ```vbnet
    C1MediaPlayer1.IsLooping = True
    ```

    ```csharp
    c1MediaPlayer1.IsLooping = true;
    ```
4. Run the program.