public MainWindowFrame()
        {
            this.InitializeComponent();

            _ctrlFullWindowGrid    = this.Find <Grid>("CtrlFullWindowGrid");
            _ctrlMainGrid          = this.Find <Grid>("CtrlMainGrid");
            _ctrlCustomTitleArea   = this.Find <StackPanel>("CtrlCustomTitleArea");
            _ctrlHeaderArea        = this.Find <Panel>("CtrlHeaderArea");
            _ctrlMainContentArea   = this.Find <Panel>("CtrlMainContentArea");
            _ctrlFooterArea        = this.Find <Panel>("CtrlFooterArea");
            this.DialogHostControl = this.Find <DialogHostControl>("CtrlDialogHost");
        }
        public Task <object?> ShowControlDialogAsync(DialogHostControl host, string headerText)
        {
            if (_closeCompletionSource != null)
            {
                throw new ApplicationException($"Unable to show {this.GetType().FullName} because it is already shown!");
            }
            _closeCompletionSource = new TaskCompletionSource <object?>();

            _host = host;
            _host.ShowDialog(this, headerText);

            return(_closeCompletionSource.Task);
        }