changing style of SMFPlayer causes ParserError

Sep 28, 2010 at 5:55 PM

Error: Unhandled Error in Silverlight Application
Code: 2531   
Category: ParserError      
Message: Failed to assign to property 'Microsoft.SilverlightMediaFramework.Core.BitrateGraphControl.AvailableBitrates'.    

So i get this error when i try to change my style at runtime, this error is thrown even if i make 2 identical default style and try changing it, here is my code for the style change,


        void button_Click(object sender, RoutedEventArgs e)
        {
            _fullScreen = !_fullScreen;
            if (_fullScreen)
            {
                this.Style = Application.Current.Resources["CustomPlayerStyle1"] as Style;
            }
            else
            {

                this.Style = Application.Current.Resources["CustomPlayerStyle1"] as Style;

            }
        }