I can not get the tabs to populate. What am I doing wrong. I am doing bear minimum right now. The control loads but the tabs do not.
/// <summary>
/// Build a TabView controller that uses the SummaryDetailView
/// </summary>
public class SummaryDetailTabController : TabViewController
{
#region Ctor
/// <summary>Ctor, defaulted to an inactive tab when first shown.</summary>
public SummaryDetailTabController()
: this(false) { }
/// <summary>Ctor.</summary>
/// <param name="pIsFirstActiveTab">
/// <see langword="truen"/> if this will be the active tab when first shown.
/// </param>
public SummaryDetailTabController(bool pIsFirstActiveTab)
: base(pIsFirstActiveTab)
{
}
#endregion
#region TabViewController overrides
/// <summary>
/// Create the MasterDetail view and it's member views,
/// then add them to WorkItem SmartParts.
/// </summary>
public override void CreateView()
{
CreateDetailTabs();
CreateSummaryDetailView();
}
/// <summary>Configure the view-specific events, often responding to BindingSource events.</summary>
public override void ConfigureEvents()
{
}
/// <summary>Refresh the view.</summary>
public override void Refresh(IAppView pActiveView)
{
}
/// <summary>Set the View's Tab's SmartPartInfo within the
/// <see cref="TabViewController.ShowInTabWorkspace"/> phase.</summary>
protected override TabSmartPartInfo SetSmartPartInfo()
{
///<example>
return SmartPartInfoFns.MakeTabSmartPartInfo("SummaryDetailTab", "MasterLabelText", IsFirstActiveTab);
///</example>
}
#endregion
#region CreateView additions
/// <summary>Create SummaryDetailView</summary>
private void CreateSummaryDetailView()
{
//int summaryHeight = mSummaryView.PreferredHeight;
View = mSummaryDetailView = (ISummaryDetailView)
ViewFactory.AddNew(ViewNames.SummaryDetail, WorkItem, mSummaryDetailIdNumber);
mSummaryDetailView.PreferredSummaryViewHeight = 0;// summaryHeight;
//if (mTabViewControllers.Count == 0) mSummaryDetailView.DetailViewCollapsed = true;
}
/// <summary>Create the DetailTabs.</summary>
/// <remarks>Typically make use of <see cref="TabViewControllers"/>.</remarks>
protected void CreateDetailTabs()
{
AddDetailTabs();
TabViewControllers.CreateView();
}
#endregion
#region Abstract
/// <summary>Add the DetailTabs.</summary>
/// <remarks>
/// Typically make use of <see cref="TabViewControllers"/>.
/// See <see cref="CreateDetailTabs"/>.
/// </remarks>
protected void AddDetailTabs()//protected abstract void AddDetailTabs();
{
TabViewControllers.Add(new GeneralTabViewController<FacilityCapacityView>("Capacity", "Capacity Info", true));
}
#endregion
#region Members
/// <summary>The list of <see cref="TabViewController"/> objects that
/// create, configure, and manage the views in the Detail TabPages.</summary>
protected TabViewControllerList TabViewControllers
{
get
{
if (mTabViewControllers == null)
{
mTabViewControllers = WorkItem.Items.AddNew<TabViewControllerList>();
}
return mTabViewControllers;
}
}
#endregion
#region Other Private
private string SummaryViewId
{
get { return msSummaryDetailViewIdBase + mSummaryDetailIdNumber; }
}
#endregion
#region Fields
private ISummaryDetailView mSummaryDetailView;
private IBindingView mSummaryView;
private TabViewControllerList mTabViewControllers;
private const string msSummaryDetailViewIdBase = "SummaryDetail_";
private readonly string mSummaryDetailIdNumber = Guid.NewGuid().ToString();
#endregion
}