# Turning Off Autoplay

## 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 autoplay audio files; however, you can turn this feature off by setting the [C1MediaPlayer.AutoPlay](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaPlayer.AutoPlay.html) property to **False**.

**At Design Time**

To turn off autoplay, 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 **AutoPlay** check box and deselect it.

**In XAML**

To turn off autoplay, add **AutoPlay="False"** to the *\<c1mediaplayer:C1MediaPlayer>*  tag so that the markup resembles the following:

```auto
<c1mediaplayer:C1MediaPlayer Name="C1MediaPlayer1" AutoPlay="False">
```

**In Code**

To turn off autoplay, 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.AutoPlay = False
    ```

    ```csharp
    c1MediaPlayer1.AutoPlay = false;
    ```
4. Run the program.