在WIndows Phone 7应用程序中放置文本块

时间:2014-03-08 07:37:25

标签: c# xaml windows-phone-7.1

我正在使用WIndows手机7构建一个应用程序。我有以下xaml:

<Rectangle Fill="White" HorizontalAlignment="Left" Height="123" Margin="273,173,0,0"
Stroke="Black" VerticalAlignment="Top" Width="172" RadiusX="20" RadiusY="20 />

现在,我想插入一个文本,并使其可点击以导航到新页面。这该怎么做。请分享一些代码

1 个答案:

答案 0 :(得分:0)

<Rectangle Fill="White" HorizontalAlignment="Left" Height="123" Margin="273,173,0,0"
 Stroke="Black" VerticalAlignment="Top" Width="172" RadiusX="20" RadiusY="20"
 MouseDown="SomeFunctionInCodeBehindToTakeYouToANewPage" />
<TextBlock HorizontalAlignment="Left" IsHitTestVisible="False" Margin="340,222,0,0" 
 VerticalAlignment="Top" Text="I Like Pie" />