大家好,
我发现我的 Silverlight 应用程序中的文本块存在问题。从我附上的图片中可以看出,在“如何玩”silverlight 页面中,如果我从不同的路线导航,标题必然会消失。
请注意,这是带有静态措辞的静态文本块。只是从不同的导航点来看,缺少标题措辞!
我使用 this.content = new things 从一个屏幕导航到另一个屏幕;(例如:this.content = 新指令())
有人可以指导我如何克服这个问题吗?我所有的页面都不是用户控件,而只是 silverlight 页面。
<navigation:Page x:Class="SpotTheDifference.UI.Game.Silverlight.instruction"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
d:DesignWidth="893" d:DesignHeight="670"
Title="BonusLink Spot 'd' Difference">
<Grid x:Name="LayoutRoot">
<Image x:Name="imgBG" HorizontalAlignment="Left" Height="670" VerticalAlignment="Top" Width="893" Source="/img/bg/dialogbox-bg.jpg" Visibility="Visible"/>
<Image x:Name="imgPlayGame" HorizontalAlignment="Left" Height="50" Margin="731,209,0,0" VerticalAlignment="Top" Width="145" Source="/img/btn/btn_play_red.png"/>
<Button x:Name="btnPlay" Content="" HorizontalAlignment="Left" Margin="731,209,0,0" VerticalAlignment="Top" Width="145" Height="50" Opacity="0" Click="btnPlay_Click" MouseEnter="btnPlay_MouseEnter" MouseLeave="btnPlay_MouseLeave"/>
<Image x:Name="imgScoreBoard" HorizontalAlignment="Left" Height="50" Margin="731,264,0,0" VerticalAlignment="Top" Width="145" Source="/img/btn/btn_scoreboard_red.png"/>
<Button x:Name="btnScoreBoard" Content="" HorizontalAlignment="Left" Margin="731,264,0,0" VerticalAlignment="Top" Width="145" Height="50" Opacity="0" Click="btnScoreBoard_Click" MouseEnter="btnScoreBoard_MouseEnter" MouseLeave="btnScoreBoard_MouseLeave"/>
<Image x:Name="imgProfile" HorizontalAlignment="Left" Height="50" Margin="731,319,0,0" VerticalAlignment="Top" Width="145" Source="/img/btn/btn_profile_red.png"/>
<Button x:Name="btnProfile" Content="" HorizontalAlignment="Left" Margin="731,319,0,0" VerticalAlignment="Top" Width="145" Height="50" Opacity="0" Click="btnProfile_Click" MouseEnter="btnProfile_MouseEnter" MouseLeave="btnProfile_MouseLeave"/>
<Image x:Name="imgHowToPlay" HorizontalAlignment="Left" Height="50" Margin="731,374,0,0" VerticalAlignment="Top" Width="145" Source="/img/btn/btn_howto_green.png"/>
<Image x:Name="imgLogOut" HorizontalAlignment="Left" Height="50" Margin="731,429,0,0" VerticalAlignment="Top" Width="145" Source="/img/btn/btn_logout_red.png"/>
<Button x:Name="btnLogOut" Content="" HorizontalAlignment="Left" Margin="731,429,0,0" VerticalAlignment="Top" Width="145" Height="50" Opacity="0" Click="btnLogOut_Click" MouseEnter="btnLogOut_MouseEnter" MouseLeave="btnLogOut_MouseLeave"/>
<TextBlock x:Name="lblDesc" HorizontalAlignment="Left" Margin="145,250,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="505" Height="195" Foreground="#FF007EFF" FontFamily="Comic Sans MS" FontSize="14.667" FontWeight="Bold">
<Run Text="There will be a set of 2 almost identical pictures revealed every month for players to identify 10 differences each."/>
<LineBreak/>
<Run/>
<LineBreak/>
<Run Text="With every correct click, a circle will appear on the difference spot; whereas every wrong click, the timer will be further reduced."/>
<LineBreak/>
<Run/>
<LineBreak/>
<Run Text="Total play time for this game is 30 seconds."/>
<LineBreak/>
<Run Text="(Hint: The faster you identify the differences, the higher the score)"/>
</TextBlock>
<TextBlock x:Name="lblHeader" Text="Spot 'd' Difference: How to Play Instruction" Margin="146,214,275,427" FontFamily="Comic Sans MS" FontSize="21.333" FontWeight="Bold" Width="472" Height="29" />
</Grid>