private void Dispose() { UnsubscribeEventAndCommands(); if (_workControl != null) { _regionManager.Regions[RegionNames.WorkName].Remove(_workControl); _workControl = null; } }
// Work Items #region btnWorkItems_Click protected void btnWorkItems_Click(object sender, EventArgs e) { if (pnlWorkItems.Visible == true) { WorkControl.SetView("Default"); } DisableAllButtons(); btnWorkItems.Font.Bold = true; btnWorkItems.Font.Underline = true; pnlWorkItems.Visible = true; }
public void InitWorkArea() { if (_workControl != null) { return; } if (!_regionManager.Regions.ContainsRegionWithName(RegionNames.WorkName)) { return; } _workControl = _container.Resolve <WorkControl>(new ValueTuple <Type, object>(typeof(string), _guid), new ValueTuple <Type, object>(typeof(bool), IsSelected)); _workControl.Visibility = IsSelected ? Visibility.Visible : Visibility.Hidden; _regionManager.Regions[RegionNames.WorkName].Add(_workControl, null, true); }