TreeView & CommandHandler in SCSF

Topics: CAB & Smart Client Software Factory
Jan 15, 2007 at 9:00 AM
Hey guys,
I have spent some time working on the problem that I am facing with respect to the TreeView NodeMouseDoubleClick event and the corresponding Command handler.

Here's a link that will explain the entire process and also provide snapshots.

http://cab-scsf.blogspot.com/2007/01/i-was-playing-around-with-new-smart.html

Any help would highly be appreciated.

Thanks
Anup
Jan 15, 2007 at 7:34 PM
Wouldn't a loosely coupled event be more apt in this case?

The examples I've seen and code I've written with Commands also involves registering the Container Control containing those commands with the UIExtensionSite var.

In addition, to register a treeview control with UIExtensionSite, you need to put the TreeView in a "Container Control" and write a UIElement Adapter for it. Plus, even though the AddInvoker method accepts an "object", I think it's limited to certain kinds (namely, the ToolStripMenuItem). I'm not sure if you can add an Invoker with the double-click event of the tree view control.

Publish an event for the treeview's doubleclick event, and subscribe to that event in the Module Controller. That seems to be an easier solution.

P.S. Not a big deal, but the site you linked truncates your code sections on the right.
Jan 16, 2007 at 5:35 PM
Hey thanks for the inputs. I did think of implementing it as events but I might actually go the UIExtension site route as that is ideal.

Thanks
Anup