Print Page | Close Window

[SOLVED] DotNetTabWorkspace instead of DeckWorkspace

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=627
Printed Date: 05-May-2024 at 3:44pm


Topic: [SOLVED] DotNetTabWorkspace instead of DeckWorkspace
Posted By: vecs
Subject: [SOLVED] DotNetTabWorkspace instead of DeckWorkspace
Date Posted: 19-Dec-2007 at 12:23am
Please, suggest a way to build shell with DotNetTabWorkspace instead of DeckWorkspace. I mean workspace treated as "ShellContentWorkspace".


-------------



Replies:
Posted By: vecs
Date Posted: 20-Dec-2007 at 3:36am
Solved.
1. Copy DotNetShellLayoutView.cs from IdeaBlade.Cab.DotNet project to your Foundation project (\Views\Layout folder).
2. Rename file to TabbedDotNetShellLayoutView.cs and rename (refactor) its class to TabbedDotNetShellLayoutView.
3. Open TabbedDotNetShellLayoutView in designer and delete DeckWorkspace. Then Put DotNetTabWorkspace in place of deleted DeckWorkspace and set its name as mShellContentWorkspace.
4. Open your FoundationModule and modify this method:

private static IViewFactoryService GetViewFactoryService(ServiceCollection pServices) {
  IViewFactoryService viewFactory = pServices.Get<IViewFactoryService>();
  //here was the original IdeaBlade CAB commented template for this:
  viewFactory.UnregisterViewType(ViewNames.ShellLayout);
  viewFactory.RegisterViewType<Views.Layout.TabbedDotNetShellLayoutView>(ViewNames.ShellLayout);
       
  return viewFactory;
}


That is all.






-------------


Posted By: Bill Jensen
Date Posted: 20-Dec-2007 at 2:02pm

Good solution.

You've basically reproduced our solution.  If you look in
 
Source->Infrastructure->(yourapp).Foundation\Views\Layout
 
and select Show All Files (in the Solution Explorer), you'll see there is a TabbedShellLayoutView that is present, but not included in the project. 
Just include it in the project and register it in ViewFactoryService as you did your own view.
 
It's basically the same as your solution.  Note that it doesn't provide for linkage back to the nav bar list when a tab is selected.
 
Sorry I didn't get this to you sooner.
 
Bill J.



Print Page | Close Window