예제 #1
0
        protected override void ShowDialog()
        {
            var viewModel = ActivityArgs.GetArgs <DataItemChooserViewModel <T> >();
            var window    = new ViewControllerWindow
            {
                DataContext = viewModel,
                Content     = new DataItemChooserView {
                    Width = 300, Margin = new Thickness(10, 5, 10, 10)
                },
                Title = viewModel.Header,
            }.RemoveIcon().HideMinMaxButton();
            var r      = window.ShowDialog();
            var result = new AsyncActivityResult <DataItemChooserViewModel <T> >(r.GetValueOrDefault(false), viewModel);

            Completion.TrySetResult(result);
        }
예제 #2
0
        protected override void ShowDialog()
        {
            var viewModel = ActivityArgs.GetArgs <InputBoxViewModel>() ?? new InputBoxViewModel();
            var window    = new ViewControllerWindow
            {
                DataContext = viewModel,
                Content     = new InputBox {
                    Width = 300, Margin = new Thickness(10, 5, 10, 10)
                },
                Title         = viewModel.Header,
                SizeToContent = SizeToContent.WidthAndHeight,
                ResizeMode    = ResizeMode.NoResize,
            }.RemoveIcon().HideMinMaxButton();
            var r      = window.ShowDialog();
            var result = new AsyncActivityResult <InputBoxViewModel>(r.GetValueOrDefault(false), viewModel);

            Completion.TrySetResult(result);
        }
예제 #3
0
        private Window PrepareProgressView()
        {
            var options = ActivityArgs.GetArgs <ProgressViewOptions>();

            var window = new ViewControllerWindow
            {
                SizeToContent = SizeToContent.Height,
                DataContext   = new ProgressViewModel(),
                ResizeMode    = ResizeMode.CanMinimize,
                Content       = new ProgressView {
                    Margin = new Thickness(5)
                },
                Title         = options != null ? options.Header : "Copy",
                ShowInTaskbar = true,
                Topmost       = true,
                Width         = 500,
            }.RemoveIcon();

            return(window);
        }