まず、そのようなボタンのコンテンツのソースを変更することはできません。ボタンのテンプレートとPART_Imageのようなイメージの名前を再定義する必要があります。そのため、VisualStateからアクセスできます。
テンプレートではなく、XAMLで両方の背景を直接指定できるようにするには、Buttonから継承するカスタムのUserControlを実装する必要があります。
しかし、そうしないと、単にImageBrushを使って背景をペイントすることができます。
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<ImageBrush ImageSource="Pressed.png" />
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
同様に、画像を非押された状態にしたい場合は、同様に、ボタンの定義を変更します。
<Button Style="{StaticResource CustomButton}">
<Button.Background>
<ImageBrush ImageSource="NotPressed.png" />
</Button.Background>
<Button.Content>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
<TextBlock VerticalAlignment="Center" Text="hello" />
</StackPanel>
</Button.Content>
</Button>
最後の質問とはどのように違いますか? http://stackoverflow.com/questions/6870091/windows-phone-7-button-states –
ちょっと、彼は今、VisualStatesの仕組みではなく、テンプレート作成の方法を尋ねています。 –