Example #1
0
        private void NavigationView_SelectionChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args)
        {
            var navParam = new PropertyNavParam()
            {
                tokenSource         = tokenSource,
                navParameter        = navParameterItem,
                AppInstanceArgument = AppInstance
            };

            switch (args.SelectedItemContainer.Tag)
            {
            case "General":
                contentFrame.Navigate(typeof(PropertiesGeneral), navParam, args.RecommendedNavigationTransitionInfo);
                break;

            case "Shortcut":
                contentFrame.Navigate(typeof(PropertiesShortcut), navParam, args.RecommendedNavigationTransitionInfo);
                break;

            case "Library":
                contentFrame.Navigate(typeof(PropertiesLibrary), navParam, args.RecommendedNavigationTransitionInfo);
                break;

            case "Details":
                contentFrame.Navigate(typeof(PropertiesDetails), navParam, args.RecommendedNavigationTransitionInfo);
                break;

            case "Security":
                contentFrame.Navigate(typeof(PropertiesSecurity), navParam, args.RecommendedNavigationTransitionInfo);
                break;
            }
        }
Example #2
0
        private void SettingsBlockControl_Click(object sender, bool isExpanding)
        {
            var tag          = (sender as Control).Tag as string;
            var contentFrame = (sender as SettingsBlockControl).ExpandableContent as Frame;

            if (contentFrame.Content != null || !isExpanding)
            {
                return;
            }

            var navParam = new PropertyNavParam()
            {
                tokenSource         = tokenSource,
                navParameter        = navParameterItem,
                AppInstanceArgument = AppInstance
            };

            switch (tag)
            {
            case "General":
                contentFrame.Navigate(typeof(PropertiesGeneral), navParam);
                break;

            case "Shortcut":
                contentFrame.Navigate(typeof(PropertiesShortcut), navParam);
                break;

            case "Library":
                contentFrame.Navigate(typeof(PropertiesLibrary), navParam);
                break;

            case "Details":
                contentFrame.Navigate(typeof(PropertiesDetails), navParam);
                break;

            case "Security":
                contentFrame.Navigate(typeof(PropertiesSecurity), navParam);
                break;

            case "Customization":
                contentFrame.Navigate(typeof(PropertiesCustomization), navParam);
                break;

            case "Compatibility":
                contentFrame.Navigate(typeof(PropertiesCompatibility), navParam);
                break;
            }
        }