Example #1
0
        public ImageContentEditorWindow(ImageContent toLoad)
        {
            InitializeComponent();

            StatusContext = new StatusControlContext();
            ImageEditor   = new ImageContentEditorContext(StatusContext, toLoad);

            DataContext            = this;
            AccidentalCloserHelper = new WindowAccidentalClosureHelper(this, StatusContext, ImageEditor);
        }
Example #2
0
        public ImageContentEditorWindow()
        {
            InitializeComponent();

            StatusContext = new StatusControlContext();

            StatusContext.RunFireAndForgetBlockingTaskWithUiMessageReturn(async() =>
            {
                ImageEditor = await ImageContentEditorContext.CreateInstance(StatusContext);

                ImageEditor.RequestContentEditorWindowClose += (sender, args) => { Dispatcher?.Invoke(Close); };
                AccidentalCloserHelper = new WindowAccidentalClosureHelper(this, StatusContext, ImageEditor);

                await ThreadSwitcher.ResumeForegroundAsync();
                DataContext = this;
            });
        }