【发布时间】:2012-02-10 14:28:10
【问题描述】:
您好,我对用于 wp7 编程的 silverlight/xna 模板有疑问。
我开始一个新的项目,然后在游戏屏幕上绘制一些内容。然后我将以下内容添加到 GamePage 的 xaml 页面中:
<Grid Height="800" Name="grid1" Width="480" Background="White">
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,12,0,0" Name="textBlock1" Text="Lifes: 3" VerticalAlignment="Top" Foreground="Black" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="393,12,0,0" Name="textBlock2" Text="Points: 0" VerticalAlignment="Top" Foreground="Black" />
</Grid>
但问题是我没有看到 textBlock,我也不知道为什么。 谁能给个提示?
【问题讨论】:
-
你的页面方向是什么(横向)?
-
SupportedOrientations="Portrait" Orientation="Portrait"
-
我有分析器,我必须使用 UIElementRenderer
-
这是相当基础 - MSDN 上的 SL/XNA 代码示例应该会引导您完成所有这些。
标签: silverlight windows-phone-7 xaml xna