# Setting the Initial Volume

## Content

You can set the initial volume setting of the [C1MediaPlayer](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaPlayer.html) control by setting the [C1MediaPlayer.Volume](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaPlayer.Volume.html) property to a value between 0 and 1. In this topic, you will set the volume so that it's at its midway point upon page load.

**At Design Time**

To set the volume, complete the following steps:

1. Click the **C1MediaPlayer** control once to select it.
2. In the **Properties** window (or **Properties** panel in Blend), set the **Volume** property to "0.5".
3. Run the program and observe that the **C1MediaPlayer** control's volume is set halfway.

**In XAML**

To set the volume, complete the following steps:

1. Add `Volume="0.5"` to the *\<c1mediaplayer:C1MediaPlayer>* tag so that the markup resembles the following:

    ```auto
    <c1mediaplayer:C1MediaPlayer Name="C1MediaPlayer1" Volume="0.5">
    ```
2. Run the program and observe that the **C1MediaPlayer** control's volume is set halfway.

**In Code**

To set the volume, 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.Volume = 0.5
    ```

    ```csharp
    c1MediaPlayer1.Volume = 0.5;
    ```
4. Run the program and observe that the **C1MediaPlayer** control's volume is set halfway.