我的Windows Phone 8.1应用程序中有2页。
第1页显示9个图像按钮。其目的是允许用户输入他们的4位数PIN码以进入下一个屏幕。
情景:
用户输入PIN码并进入第二屏幕。
我去睡觉了。
我醒了。我去了我的手机。
我在第二个屏幕上。
我按下后退按钮。
我的按钮上的图像不显示。
我仍然可以按下“隐形”按钮。
为什么我的图片没有显示?
我的xaml:
<Button BorderThickness="0" Name="btn4" Grid.Row="2" Grid.Column="0" Width="75" Height="75" HorizontalAlignment="Center" >
<Button.Background >
<ImageBrush ImageSource="/Images/Number-4-icon.png" Stretch="Uniform"/>
</Button.Background>
</Button>
<Button BorderThickness="0" Name="btn5" Grid.Row="2" Grid.Column="1" Width="75" Height="75" HorizontalAlignment="Center" >
<Button.Background >
<ImageBrush ImageSource="/Images/Number-5-icon.png" Stretch="Uniform"/>
</Button.Background>
</Button>
<Button BorderThickness="0" Name="btn6" Grid.Row="2" Grid.Column="2" Width="75" Height="75" HorizontalAlignment="Center" >
<Button.Background >
<ImageBrush ImageSource="/Images/Number-6-icon.png" Stretch="Uniform"/>
</Button.Background>
</Button>
<Button BorderThickness="0" Name="btn7" Grid.Row="3" Grid.Column="0" Width="75" Height="75" HorizontalAlignment="Center" >
<Button.Background >
<ImageBrush ImageSource="/Images/Number-7-icon.png" Stretch="Uniform"/>
</Button.Background>
</Button>
<Button BorderThickness="0" Name="btn8" Grid.Row="3" Grid.Column="1" Width="75" Height="75" HorizontalAlignment="Center" >
<Button.Background >
<ImageBrush ImageSource="/Images/Number-8-icon.png" Stretch="Uniform"/>
</Button.Background>
</Button>
<Button BorderThickness="0" Name="btn9" Grid.Row="3" Grid.Column="2" Width="75" Height="75" HorizontalAlignment="Center" >
<Button.Background >
<ImageBrush ImageSource="/Images/Number-9-icon.png" Stretch="Uniform"/>
</Button.Background>
</Button>
<Button BorderThickness="0" Name="btnReset" Grid.Row="4" Grid.Column="0" Width="75" Height="75" HorizontalAlignment="Center" Margin="0" Padding="9.5,0,9.5,3.5" >
<Button.Background >
<ImageBrush ImageSource="ms-appx:///Images/undo.png" Stretch="Uniform" />
</Button.Background>
</Button>
<Button BorderThickness="0" Name="btn0" Grid.Row="4" Grid.Column="1" Width="75" Height="75" HorizontalAlignment="Center" >
<Button.Background >
<ImageBrush ImageSource="/Images/Number-0-icon.png" Stretch="Uniform"/>
</Button.Background>
</Button>
<Button BorderThickness="0" Name="btnDel" Grid.Row="4" Grid.Column="2" Width="75" Height="75" HorizontalAlignment="Center" >
<Button.Background >
<ImageBrush ImageSource="/Images/delete_key.png" Stretch="Uniform"/>
</Button.Background>
</Button>
</Grid>
<Grid x:Name="Footer" Background="Black" Grid.Row="4" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="txtError" Grid.Column="0" FontSize="18" Margin="10,10,10,10" Text="Enter PIN" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Foreground="#FFE8E82F" FontWeight="Bold" />
</Grid>
</Grid>