Q:

XAML Windows Phone 8.1 Button should change backgroundImage

I know this kind of question have been asked a lot. But I couldn't solve it by my own.
The challenge to achieve is a simple button without any styling except a changing background image for several states (default, pressed and hover).
The code I've done so far is in my App.xaml file: 
            <Style x:Key="likeActionButton" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal">
                                    </VisualState>
                                    <VisualState x:Name="PointerOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetName="HoverBackground"
                                                Storyboard.TargetProperty = "Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames
                                                Storyboard.TargetName="PressedBackground"
                                                Storyboard.TargetProperty = "Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border>
                                <Grid>
                                    <Image Source="Assets/ActionsIcons/like-action.png"></Image>
                                    <Image x:Name="HoverBackground" Source="Assets/ActionsIcons/like-action-onHover.png" Visibility="Collapsed"></Image>
                                    <Image x:Name="PressedBackground" Source="Assets/ActionsIcons/like-action-on-pressed.png" Visibility="Collapsed"></Image>
                                </Grid>        
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

[Calling the button style from somewhere]
                    <Button Style="{StaticResource likeActionButton}"/>

So this XAML code seems to do nothing because there is no image at all..
Cheers, 
Chris

A:

It looks like an initial slash is needed to accurately path the location of the image because the image is not relative to the current xaml path. 
Change
Source="Assets/ActionsIcons/like-action-on-pressed.png"
to the root of the package with 
Source="/Assets/ActionsIcons/like-action-on-pressed.png"
It does not look likes these are dynamic databound images. Dynamic images need ms-appx:/// because they are not declared in xaml and need a special nomenclature to be properly pathed. 
I believe the advice to add ms-appx:/// works because it is providing a proper path which can be resolved, but is superfluous if a / is just added to the path.

For a better understanding read How to load file resources (XAML) (Windows)

