Silverlight Quick Start > Step 1 of 3: Creating an Application with a C1MediaPlayer Control |
In this step, you'll begin in Visual Studio to create a Silverlight application using MediaPlayer for Silverlight.
Complete the following steps:
XAML |
Copy Code
|
---|---|
<UserControl x:Class="SilverlightApplication24.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="Auto" d:DesignHeight="Auto"> |
The UserControl will now resize to accommodate any content placed within it.
XAML |
Copy Code
|
---|---|
<Grid x:Name="LayoutRoot"> <c1mediaplayer:C1MediaPlayer></c1mediaplayer:C1MediaPlayer> </Grid> </UserControl> |
Height="300"
to the <c1mediaplayer:C1MediaPlayer>
tag to set the height of the control. The XAML markup appears as follows:
<c1mediaplayer:C1MediaPlayer Height="300">
Width="350"
to the <c1mediaplayer:C1MediaPlayer>
tag to set the width of the control. The XAML markup appears as follows:
<c1mediaplayer:C1MediaPlayer Height="300" Width="350">
You've successfully created a Silverlight application containing a C1MediaPlayer control. In the next step, you will add video content to the C1MediaPlayer control.