DockPanelSmartPartInfo, how can I set its width?

Jul 16, 2008 at 3:10 PM
Edited Jul 16, 2008 at 3:12 PM
Hi all,

 first thank to all that contributed to the SCSF Contrib, it's very useful and it enabled me the reduce some development time since things are already done :)

 I'm using a OutlookBarWorkspace inside a view, that I placed the view inside the infrastructure module and all the modules have the possibility of inserting their own icons:
 The view name is OutlookBar. The guys that will be using our application complain that the size of the left dock area is too big (I share their opinion).
 I'm able to set the max. size of the OutlookBar but not of the container were this view is, I'm sure that I'm able to set the size of the view correctly (but it's dock style is fill at this time so I cannot notice any change).
Is there any change of reducing the width of the docking area (don't know if this is the correct name...)?

 This is the code that I'm using to show the view:

            OutlookBar view = WorkItem.SmartParts.AddNew<OutlookBar>();
            DockPanelSmartPartInfo dockInfo = new DockPanelSmartPartInfo(string.Empty, string.Empty);
            dockInfo.Icon = System.Drawing.Icon.FromHandle(Properties.Resources.imgPackage16x16.GetHicon());
            dockInfo.DockingType = DockingType.TaskView;
            dockInfo.ShowStrategy = new DockStateShowStrategy(DockState.DockLeft);
            WorkItem.Workspaces[WorkspaceNames.RightWorkspace].Show(view, dockInfo);
            WorkItem.RootWorkItem.Workspaces.Add(view.outlookBarWorkspace, WorkspaceNames.LeftWorkspace);


Thanks for all the help,

Luis Pinho

Since I cannot post any images, setting the max size of the view itself the result is something like this:

Free Image Hosting at www.ImageShack.us

QuickPost
Jul 16, 2008 at 3:37 PM
Sorry for replying to my own question.

After looking at the test suite application I was able to find the solution for this.

This property is set on the main workspace (RightWorkspace for me), namely on the DockLeftPortion property.

Thanks and best regards,

Luís Pinho

lpinho wrote:
Hi all,

 first thank to all that contributed to the SCSF Contrib, it's very useful and it enabled me the reduce some development time since things are already done :)

 I'm using a OutlookBarWorkspace inside a view, that I placed the view inside the infrastructure module and all the modules have the possibility of inserting their own icons:
 The view name is OutlookBar. The guys that will be using our application complain that the size of the left dock area is too big (I share their opinion).
 I'm able to set the max. size of the OutlookBar but not of the container were this view is, I'm sure that I'm able to set the size of the view correctly (but it's dock style is fill at this time so I cannot notice any change).
Is there any change of reducing the width of the docking area (don't know if this is the correct name...)?

 This is the code that I'm using to show the view:

            OutlookBar view = WorkItem.SmartParts.AddNew<OutlookBar>();
            DockPanelSmartPartInfo dockInfo = new DockPanelSmartPartInfo(string.Empty, string.Empty);
            dockInfo.Icon = System.Drawing.Icon.FromHandle(Properties.Resources.imgPackage16x16.GetHicon());
            dockInfo.DockingType = DockingType.TaskView;
            dockInfo.ShowStrategy = new DockStateShowStrategy(DockState.DockLeft);
            WorkItem.Workspaces[WorkspaceNames.RightWorkspace].Show(view, dockInfo);
            WorkItem.RootWorkItem.Workspaces.Add(view.outlookBarWorkspace, WorkspaceNames.LeftWorkspace);


Thanks for all the help,

Luis Pinho

Since I cannot post any images, setting the max size of the view itself the result is something like this:

Free Image Hosting at www.ImageShack.us

QuickPost