【发布时间】:2016-05-31 02:10:59
【问题描述】:
我有一个简单的问题(希望如此)。我需要崩溃(或做一些 其他更改)从其他表单/框架(子或 父母),但我不知道该怎么做。很高兴提到我是 开发 Windows 通用应用程序。而且我还需要从 其他框架到其他框架...
我想让它变得非常简单易懂,那就是 为什么我喜欢用非常简单的例子来说明我的意思。
对不起,我的英语不是我的母语。
第一页 XAML
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<Button Content="LoadFrame" Click="Button_Click"/>
<Button x:Name="KillMeOne" Content="Kill Me From Frame Two"/>
</StackPanel>
<Frame x:Name="TheSecondFrame" Grid.Row="1"/>
<Frame x:Name="FrameThreeComesHere" Grid.Row="2"/>
</Grid>
第二页 XAML
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel>
<Button Content="Load Frame Three From Here Form In 'FrameThreeComesHere-frame' But How?"/>
<Button Content="Kill The Button From Page One But How?"/>
</StackPanel>
</Grid>
第三页 XAML
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<TextBlock Text="HelloWord!"/>
</Grid>
第一页 CS 代码...
private void Button_Click(object sender, RoutedEventArgs e)
{
TheSecondFrame.Navigate(typeof(PageTwo));
}
【问题讨论】: