WorkItem SmartParts vs Items collection confusion

Topics: CAB & Smart Client Software Factory
Nov 27, 2006 at 7:41 AM
originally posted by: qzrlsd

I've been experimenting with this block for a while now. In a sample scenario I had the following code to show a modal view:

ISomeView someView = WorkItem.Items.AddNew<SomeView>(); WorkItem.WorkspacesWorkspaceNames.ModalWindows.Show(someView);

This all seems to work fine. But looking at the some sample projects I’ve noticed views being added to the SmartParts Collection instead.

ISomeView someView = WorkItem.SmartParts.AddNew<SomeView>(); WorkItem.WorkspacesWorkspaceNames.ModalWindows.Show(someView);

I guess this is a daft question but can anyone help explain the benefit of creating the view through the SmartParts collection rather than the WorkItem.Items collection?
Nov 30, 2006 at 1:49 PM
originally posted by: qzrlsd

OK. Was this a really dumb question? I don't mind if someone wants to tell me...
Nov 30, 2006 at 11:52 PM
originally posted by: akol_dk

Mariano gives an answer to this in the SCSF forum. You can find it in one of the last messages on this thread:

http://www.gotdotnet.com/codegallery/messageBoard/Thread.aspx?id=941d2228-3bb5-42fd-8004-c08595821170&mbid=62788f36-a963-4feb-8470-20f1a844ed2a&threadid=c108e856-d95e-4d2b-b7cd-ae21f3d4ff75

Regards
Anders