I am using CAB and SCSF for my application and i am using CAB Extensibility Kit from Infragistics
I followed this article. The sample has three projects. Shell form . common and SmartPartLib
Infragistics CAB Extensibility Kit
in SmartPartLib project there is class ModuleController.cs. This method is creating some Views which are going to be displayed on App start... I want to know that when
this.WorkItem.Workspaces[Constants.WorkspaceNames.DockWorkspace]
is Initialized. I tried to do the same in sample SCSF project but i am getting this WorkspaceObject as null.. Please tell me is anyone using Infragistics CAB Kit...
private void AddViews()
{
//Create the Root View first, but do not show it
RootView theRootView = this.WorkItem.SmartParts.AddNew<RootView>();
//Here is the important part:
//Whenever dynamically creating controls that will interact with the
//UltraDockManager, for the best results, make sure that you
//assign a unique value to the control's "Name" property. In this case,
//since the dynamic nature of CAB and SmartParts brings us to the
//same situation, we also add a value to the SmartPart's "Name" property:
TreeView theTreeView = this.WorkItem.SmartParts.AddNew<TreeView>(); //1: Create
theTreeView.Name = "theTreeView"; //2: Set Name
this.WorkItem.Workspaces[Constants.WorkspaceNames.DockWorkspace].Show(theTreeView); //3: Show it
GridView theGridView = this.WorkItem.SmartParts.AddNew<GridView>();
theGridView.Name = "theGridView";
this.WorkItem.Workspaces[Constants.WorkspaceNames.DockWorkspace].Show(theGridView);
ChartView theChartView = this.WorkItem.SmartParts.AddNew<ChartView>();
theChartView.Name = "theChartView";
this.WorkItem.Workspaces[Constants.WorkspaceNames.DockWorkspace].Show(theChartView);
//Load the layout through the interface
((IRootView)theRootView).LoadDockLayout();
//Finally show the Root View
this.WorkItem.Workspaces[Constants.WorkspaceNames.MainWorkspace].Show(theRootView);
}