private void configControl_ReloadRequired()
 {
     ConfigControl.Content = null;
     AdminConfigControl configControl = new AdminConfigControl();
     ConfigControl.Content = configControl;
     configControl.ReloadRequired += configControl_ReloadRequired;
 }
        public AdminNavigationControl(MainPage mainPage)
        {
            // Required to initialize variables
            InitializeComponent();
            mMainPage = mainPage;
            Loaded += (s1, e1) => SetSplitterWidth(mMainPage);

            if (CMS.EffectivePrivileges.AdminTab.CanViewConfig || CMS.EffectivePrivileges.AdminTab.CanModifyConfig)
            {
                AdminConfigControl configControl = new AdminConfigControl();

                configControl.ReloadRequired += configControl_ReloadRequired;
                ConfigControl.Content = configControl;
            }

            int allUsers = (from u in CMS.Cache.Users select u).Count();
            int activeUsers = (from u in CMS.Cache.ActiveUsers select u).Count();

            EquipmentSummaryViewModel activeModel = new EquipmentSummaryViewModel("Active Users", activeUsers);
            ActiveUsersTotalControl.DataContext = activeModel;

            EquipmentSummaryViewModel inActiveModel = new EquipmentSummaryViewModel("Inactive Users", (allUsers - activeUsers));
            InactiveUsersTotalControl.DataContext = inActiveModel;
        }