<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle"
Text="{StaticResource AppName}"
Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle"
Text="Save Info"
Margin="9,-7,0,0"
Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
资源“AppName”无法解决,有什么想法吗?
答案 0 :(得分:5)
您需要在某处定义它。通常,这在App.xaml中如下:
<Application ...
xmlns:sys=clr-namespace:System;assembly=mscorlib">
<Application.Resources>
<ResourceDictionary>
<sys:String x:Key="AppName">My Application Title</sys:String>
...