How to change the color of the progressBar loading the ad/video?

Topics: Windows Phone 8
Oct 2, 2013 at 5:26 PM
I'm currently finishing the last parts of my application and I'm wondering, whether there is an easy way to do change the color of the progressBar which appears on loading the advertising/video?
(I'd also take the more complicated way ;))

Thanks!
Coordinator
Oct 7, 2013 at 9:18 PM
Here's a high level overview of how you can do this; let me know if you need more details on some of these pieces...
You can set BufferingPlugin.BufferingViewStyle to override the style of the BufferingView (which is where the progress bar is defined). You can start by taking the default xaml for the BufferingView found here, add it to your page as a named resource, modify it to change the color (you'll need to template out the progressbar element) and then programmatically set the property above with a reference to the style.
Oct 8, 2013 at 3:10 PM
Hey!

Thanks for answering.

I tried what you suggested. Only one problem:
I'm not sure whether I added the style correctly to the player. Here's what I did:
        var bufferingPlugin = player.Plugins.OfType<BufferingPlugin>().First();
        bufferingPlugin.BufferingViewStyle = App.Current.Resources["MyBufferingViewState"] as Style;
Excecuting these lines of code results in an TargetInvocationException.

I did a debug session and found out, that "MyBufferingViewState" is correctly set as a style for the BufferingViewStyle. I just copied the style from the generic.xaml without editing it.
(Thanks for showing me the generic.xaml, it will be a perfect help for my future design-related problems)

Any ideas on that ?
Feb 7, 2014 at 12:38 AM
Hi,
I am trying to resolve a similar issue. Basically I am trying to hide the progress bar. I am able to set the property like that:
           var bufferingPlugin = medialPlayerX.Plugins.OfType<BufferingPlugin>().First();
            bufferingPlugin.BufferingViewStyle = this.Resources["BufferingViewStyle"] as Style;
But the progress bar style does not take into effect. Any ideas?