Tag: 多视图

使用Template10的多个视图而不总是显示主页面?

我是T10的新手,并试图学习它。 这是Template 10 Multiple Windows的后续内容 在’常规’(意思是非Template10)UWP应用程序中,我学会了做这样的事情(作为一个简短的例子),以支持多个视图: public App() { InitializeComponent(); Suspending += OnSuspending; } readonly List _dispatchers = new List(); protected override async void OnLaunched(LaunchActivatedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; if (rootFrame == null) { rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; Window.Current.Content = rootFrame; if (rootFrame.Content == null) { rootFrame.Navigate(typeof(MainPage), e.Arguments); […]

UserControl的事件处理程序没有触发

我动态地将UserControl加载到MultiView控件中的View中。 虽然UserControl添加了一个事件处理程序,但事件永远不会触发。 我在这里想念的是什么? 谢谢! 包含ASPX页面: protected override void OnPreRender(EventArgs e) { if (MultiView1.ActiveViewIndex == 2) //If the tab is selected, load control { Control Presenter = LoadControl(“Presenter.ascx”); (MultiView1.ActiveViewIndex.Views[2].Controls.Add(Presenter); } base.OnPreRender(e); } Presenter.ascx.cs override protected void OnInit(EventArgs e) { Retry.Click += this.Retry_Click; //This is a .Net 2.0 project base.OnInit(e); } protected void Retry_Click(object sender, EventArgs e) […]