ControlTemplates does not work on WP7.1 ! HELP!

Topics: Bugs
Sep 23, 2013 at 10:16 AM
Hello,

I have written an application now I need to style it. First I have to style buttons with some graphics and text. I found a solution to change in App.xaml styles for type button and add custom ControlTemplate. I done this and after this I still did not have any image on button. After few hours of testing I done some test project without caliburnmicro and with any problems button was with image. Some bug is in source or what is wrong? Look to styling app.xaml which You can copy to Caliburn.Micro.Hello.WP7 sample and see that colour of text is changng but no image is presented:
<Application x:Class="Caliburn.Micro.HelloWP71.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Caliburn.Micro.HelloWP71">
    <Application.Resources>
        <ResourceDictionary>
            <Style TargetType="Button">
                <Setter Property="Foreground" Value="Red" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <StackPanel Orientation="Horizontal">
                                <Image Source="ApplicationIcon.png" />
                                <ContentPresenter HorizontalAlignment="Center" Content="{TemplateBinding Content}" Margin="5" />
                            </StackPanel>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <local:AppBootstrapper x:Key="bootstrapper" />
        </ResourceDictionary>
    </Application.Resources>
</Application>