Inheritance: System.Windows.Controls.UserControl
Beispiel #1
0
        private void WpfPropertyPage_Load(object sender, EventArgs e)
        {
            SuspendLayout();

            _host          = new PropertyPageElementHost();
            _host.AutoSize = false;
            _host.Dock     = DockStyle.Fill;

            if (_control == null)
            {
                _control = CreatePropertyPageControl();
            }

            ScrollViewer viewer = new ScrollViewer {
                VerticalScrollBarVisibility   = ScrollBarVisibility.Auto,
                HorizontalScrollBarVisibility = ScrollBarVisibility.Auto
            };

            viewer.Content = _control;
            _host.Child    = viewer;

            wpfHostPanel.Dock = DockStyle.Fill;
            wpfHostPanel.Controls.Add(_host);

            ResumeLayout(true);
            _control.StatusChanged += _control_OnControlStatusChanged;
        }
Beispiel #2
0
        private void WpfPropertyPage_Load(object sender, EventArgs e) {
            SuspendLayout();

            _host = new PropertyPageElementHost();
            _host.AutoSize = false;
            _host.Dock = DockStyle.Fill;

            if (_control == null) {
                _control = CreatePropertyPageControl();
            }

            ScrollViewer viewer = new ScrollViewer {
                VerticalScrollBarVisibility = ScrollBarVisibility.Auto,
                HorizontalScrollBarVisibility = ScrollBarVisibility.Auto
            };

            viewer.Content = _control;
            _host.Child = viewer;

            wpfHostPanel.Dock = DockStyle.Fill;
            wpfHostPanel.Controls.Add(_host);

            ResumeLayout(true);
            _control.StatusChanged += _control_OnControlStatusChanged;
        }
Beispiel #3
0
        protected async override Task OnSetObjects(bool isClosing) {
            if (isClosing) {
                _control.DetachViewModel();
                return;
            } else {
                //viewModel can be non-null when the configuration is changed. 
                if (_control == null) {
                    _control = CreatePropertyPageControl();
                }
            }

            _viewModel = CreatePropertyPageViewModel();

            await _viewModel.Initialize();

            _control.InitializePropertyPage(_viewModel);
        }
Beispiel #4
0
        protected override async Task OnSetObjects(bool isClosing)
        {
            if (isClosing)
            {
                _control.DetachViewModel();
                return;
            }
            else
            {
                //viewModel can be non-null when the configuration is changed.
                if (_control == null)
                {
                    _control = CreatePropertyPageControl();
                }
            }

            _viewModel = CreatePropertyPageViewModel();

            await _viewModel.Initialize();

            _control.InitializePropertyPage(_viewModel);
        }