This project is read-only.

dockPanelWorkspace.SmartPartActivated

Aug 26, 2008 at 12:21 AM

I am trying to use the SCSFContrib.CompositeUI.WinForms.Workspaces.DockPanelWorkspace in my application using the codes as shown in the Test Suite application.  When I added this line to the Class ShellLayoutView 

“AddHandler dockPanelWorkspace.SmartPartActivated, AddressOf DockPanelWorkspaceSmartPartActivated” to the constructor I got this error

 

Error

Method “Private sub DockPanelWorkspaceSmartPartActivated(sender as object, e as Microsoft.Practices.CompositeUI.Smartparts.WorkspaceEventArgs)” does not have the same signature as “Delegate Sub EventHandler(of TEventArgs as System.EventArgs)(sender as Object, e as Microsoft.Practices.CompositeUI.Smartparts.WorkspaceEventArgs)”.

 

Here is the declaration for sub DockPanelWorkspaceSmartPartActivated in the ShellLayoutView class

 

Private Sub DockPanelWorkspaceSmartPartActivated(ByVal sender As Object, ByVal e As WorkspaceEventArgs)

 ' Workaround to activate the WorkItem (Only necessary for Windows Forms Controls)

        If TypeOf dockPanelWorkspace.ActiveSmartPart Is Control Then

            DirectCast(dockPanelWorkspace.ActiveSmartPart, Control).Focus()

        End If

    End Sub

 

The event is declared in SCSFContrib.CompositeUI.WinForms.Workspaces.DockPanelWorkspace as

“Public Event SmartPartActivated As EventHandler(Of WorkspaceEventArgs) “

I don't know what to do to resolve the error, any help will be greatly appreciated.

 

Thanks

Bunmi