/// <summary>
        /// Initializes a new instance of the <see cref="MainWindowDetailsToggleViewModel"/> class.
        /// </summary>
        /// <param name="formBar">
        /// The form Bar.
        /// </param>
        public MainWindowDetailsToggleViewModel(string formBar)
        {
            _toggleViewModel = new ToggleViewModel();
            this._formBarMenuViewModel = new FormBarMenuViewModel();

            // change FormBar content when change screen
            switch (formBar)
            {
                case "Security":
                    FormBarMenuViewModel.FormBarContent = "Users";      
                    break;
                case "Collection":
                    FormBarMenuViewModel.FormBarContent = "Assignments";      
                    break;
                case "Configuration":
                    FormBarMenuViewModel.FormBarContent = "Configuration Menu";
                    break;
                case "CollectionSettings":
                    FormBarMenuViewModel.FormBarContent = "Collection Settings";
                    FormBarMenuViewModel.FormMenuContent = "Menu";
                    FormBarMenuViewModel.ChangedVisibility = Visibility.Visible;
                    break;
                case "SecuritySetting":
                    FormBarMenuViewModel.FormBarContent = "Security Settings";
                    FormBarMenuViewModel.FormMenuContent = "Menu";
                    FormBarMenuViewModel.ChangedVisibility = Visibility.Visible;
                    break;
                case "ColletionQueues":
                    FormBarMenuViewModel.FormBarContent = "Collection Queues";
                    FormBarMenuViewModel.FormMenuContent = "Menu";
                    FormBarMenuViewModel.ChangedVisibility = Visibility.Visible;
                    break;
                case "Funding":
                    FormBarMenuViewModel.FormBarContent = "Tranches";
                    break;
                case "Home":
                    FormBarMenuViewModel.FormBarContent = "Home";
                    break;
                case "AssetClasses":
                    FormBarMenuViewModel.FormBarContent = "Asset Classes";
                    FormBarMenuViewModel.FormMenuContent = "Menu";
                    break;
                case "AssetCollateralClasses":
                    FormBarMenuViewModel.FormBarContent = "Asset Collateral Classes";
                    FormBarMenuViewModel.FormMenuContent = "Menu";
                    FormBarMenuViewModel.ChangedVisibility = Visibility.Visible;
                    break;
                case "AssetFeatures":
                    FormBarMenuViewModel.FormBarContent = "Asset Features";
                    FormBarMenuViewModel.FormMenuContent = "Menu";
                    FormBarMenuViewModel.ChangedVisibility = Visibility.Visible;
                    break;
                case "AssetSetting":
                    FormBarMenuViewModel.FormBarContent = "Asset Settings";
                    FormBarMenuViewModel.FormMenuContent = "Menu";
                    FormBarMenuViewModel.ChangedVisibility = Visibility.Visible;
                    break;
                case "AssetRegister":
                    FormBarMenuViewModel.FormBarContent = "Asset Registers";
                    FormBarMenuViewModel.FormMenuContent = "Menu";
                    FormBarMenuViewModel.ChangedVisibility = Visibility.Visible;
                    break;
                case "RegisteredAsset":
                    FormBarMenuViewModel.FormBarContent = "Assets";
                    break;
            }
            this._formBarCurrent = string.Empty;
            this._formGroupBarCurrent = string.Empty;

            _changedVisibility = new Visibility();
            ChangedVisibility = Visibility.Collapsed;
            this._allUsers = null;
        }
        /// <summary>
        /// The dispose.
        /// </summary>
        public override void Dispose()
        {
            Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() =>
            {
                if (this._allUsers != null)
                {
                    this._allUsers.Clear();
                    this._allUsers = null;
                }
                if (this._allFundingSummary != null)
                {
                    this._allFundingSummary.Clear();
                    this._allFundingSummary = null;
                }
                if (this._groups != null)
                {
                    this._groups.Clear();
                    this._groups = null;
                }
                if (this._allQueueManagementDetails != null)
                {
                    this._allQueueManagementDetails.Clear();
                    this._allQueueManagementDetails = null;
                }
                if (this._screenDetailViewModel != null)
                {
                    this._screenDetailViewModel.Dispose();
                    this._screenDetailViewModel = null;
                }
                if (this._mainContent != null)
                {
                    this._mainContent.Clear();
                    this._mainContent = null;
                }
                if (this._formBarMenuViewModel != null)
                {
                    this._formBarMenuViewModel.Dispose();
                    this._formBarMenuViewModel = null;
                }
                if (this._toggleViewModel != null)
                {
                    this._toggleViewModel.Dispose();
                    this._toggleViewModel = null;
                }

                base.Dispose();
            }));
        }