【发布时间】:2014-01-16 16:04:43
【问题描述】:
我正在尝试设置我的 XAML,以便使用我研究并添加到我的项目中的一些代码。我希望我的 XAML 代码包含以下内容:
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="Sample twitter app" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="main page" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<phone:WebBrowser Grid.Row="0" Margin="-6,3,0,1" Name="loginBrowserControl" Visibility="Collapsed"
Navigated="loginBrowserControl_Navigated" Navigating="loginBrowserControl_Navigating"/>
<Grid x:Name="TweetPanel" Grid.Row="0" Visibility="Collapsed">
<TextBlock x:Name="txtUserName" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="26" FontFamily="Segoe WP Bold" Foreground="Red"/>
</Grid>
</Grid>
但是,当我尝试使用它时,Visual Studio 给了我错误“属性'内容'被设置了不止一次”。有人知道我需要做些什么改变吗?
谢谢
【问题讨论】:
-
这个发布的代码没有任何问题...请将您的代码发布在您想要放置的位置(您自己的周围 XAML 代码)!
标签: visual-studio-2010 xaml windows-phone-7