C# wpf Frame 实现一次加载多个page 20
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSy...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WpfApplication1
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : Window
{
Page1 a;
Page2 b;
public MainWindow()
{
InitializeComponent();
a=new Page1();
b = new Page2();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
frame1.Navigate(a);//Frame frame1;
frame1.Navigate(b);
}
}
}
为什么无法实现多个页面一次性加载,先加载的在Frame导航栏历史记录里,显示最新的page 展开
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WpfApplication1
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : Window
{
Page1 a;
Page2 b;
public MainWindow()
{
InitializeComponent();
a=new Page1();
b = new Page2();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
frame1.Navigate(a);//Frame frame1;
frame1.Navigate(b);
}
}
}
为什么无法实现多个页面一次性加载,先加载的在Frame导航栏历史记录里,显示最新的page 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询