Beispiel #1
0
        private ProfileTab CreateNewTab(SettingsProfile profile)
        {
            var profileTab = new ProfileTab
            {
                TabHeader     = $"{profile.PrettyName()}",
                TabIconSource = new Microsoft.UI.Xaml.Controls.SymbolIconSource()
                {
                    Symbol = Symbol.Document
                },
            };

            // The content of the tab is a frame that contains a page, pass the profile as parameter
            Frame frame = new Frame();

            frame.Navigate(typeof(ProfilePage), profile);
            profileTab.TabContent = frame;

            return(profileTab);
        }
Beispiel #2
0
        private void TabView_AddButtonClick(TabView sender, object args)
        {
            var profile = new ProfileTab();

            ProfileTabs.Add(CreateNewTab(new SettingsProfile()));
        }