How to change position and width of seekbar

Topics: Windows 8 Xaml
Nov 28, 2012 at 1:00 PM

Hello Team,

We are using MediaPlayer Element in our project as

MediaPlayer player = new MediaPlayer();

We need to adjust its slider position and width.

Can you please guide us for this ?


Thanks in Advance.

Nov 28, 2012 at 3:42 PM

The recommended way would be to do this in Xaml by creating a custom template for the controlpanel. After doing this, to change the slider's position and characteristics by Timeline control's properties.

As an example of this, you can also refer to the EntertainmentTheme.xaml file shipped with the player framework for an example of altering the default style of the player. Also look at EntertainmentAppPage.xaml in the samples to see how to wire this up to your app.

Hopefully this helps, Tim

Dec 13, 2012 at 9:31 AM

Hi timgreenfield,

I have updated Control Panels style.

Now i already have reference named Microsoft Media Platform: Player Framework.

I know how to remove this reference but don't know how to add my updated codes reference.

I have searched vsix file but i didnt get it.

Can you please guide how to add reference of updated code in windows 8 vs project ?



-Vivek Deshmukh






Dec 13, 2012 at 8:02 PM

Hi Vivek, if you're just updating the style of the control panel (xaml only) then you don't need to rebuild the player framework and re-add the reference. You can just include your xaml in your page's xaml (or in app.xaml) and it will automatically use it instead of the default xaml.


                <ResourceDictionary Source="ms-appx:///Microsoft.PlayerFramework/themes/EntertainmentTheme.xaml"/>

Note: you'll need to change the path to your custom .xaml file embedded in your project.