Пример #1
0
        private void OnPackageViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            var viewModel = (PackageViewModel)sender;

            if (e.PropertyName == "IsInEditFileMode")
            {
                if (viewModel.IsInEditFileMode)
                {
                    var fileEditor = new FileEditor
                    {
                        DataContext = viewModel.FileEditorViewModel
                    };
                    Content = fileEditor;
                }
                else
                {
                    Content = RootLayout;
                }
            }
        }
Пример #2
0
        private void OnPackageViewModelPropertyChanged(object?sender, PropertyChangedEventArgs e)
        {
            var viewModel = (PackageViewModel)sender !;

            if (e.PropertyName == "IsInEditFileMode")
            {
#if !HAS_UNO
                if (viewModel.IsInEditFileMode)
                {
                    var fileEditor = new FileEditor(SettingsManager, UIServices)
                    {
                        DataContext = viewModel.FileEditorViewModel
                    };
                    Content = fileEditor;
                }
                else
                {
                    Content = RootLayout;
                }
#endif
            }
        }