Search code examples
.netxamlwindows-phone-7windows-phone-8

Why am I not able to reuse custom XAML style PlayPauseButton from 1.8.2.2 Player framework in 2.0.0.0 player framework


I am developing a Windows Phone 8, XAML/C# application, when I update my player framework from 1.8.2.2 to 2.0.0.0 and I am not able to compile anymore I get the following error that the tags do not exits anymore.

in my ResourceDictionary which holds the XAML style code for the player framework, this style used to work in 1.8.2.2 but not in 2.0.0.0

<Style TargetType="playerFramework:PlayPauseButton" x:Name="DmPlayPauseButtonStyle" BasedOn="{StaticResource DmMediaPlayerButtonStyle}">
    <Setter Property="SelectedContent" Value=""/>
    <Setter Property="UnselectedContent" Value=""/>
    <Setter Property="FontSize" Value="36"/>
    <Setter Property="AutomationProperties.AutomationId" Value="PlayPauseButton"/>
</Style>

it is telling me that: The tag 'PlayPauseButton' does not exist in XML namespace 'clr-namespace:Microsoft.PlayerFramework;assembly=Microsoft.PlayerFramework'.

has any one else had this problem?

EDIT (I installed the V2.0.0.0 of the playerframework):

So I had to redevelop the styles using blend. the tricky part was that at first blend did not recognized the styles for the player and thus didn't allow me to easily design the player.
To overcome this I took he whole style of the player (found here: http://playerframework.codeplex.com/SourceControl/latest#Phone.SL/themes/generic.xaml) I linked the style to my player and then blend was able to assist me in designing the player.

I hope this helps you guys!

PS: there the styles from 1.8.2.2 and 2.0.0.0 are 100% different so there is not way for you to reuse the exact same code design from one to another.

EDIT2: here is the MSDN Article that helped me out for using blend http://msdn.microsoft.com/en-us/library/jj171012.aspx its got all the information i need to learn how to use blend


Solution

  • You cant re-use the XAML styles from the 1.8.2.2 Player to the 2.0.0.0 Player, because it looks like MS has rewrite the controllers. You will have to restyle everything.