Error: No UIElementAdapterFactory register for type

Aug 21, 2007 at 12:19 AM
Hi,

I am new to CAB.

I am creating shell application with UIExtensionSites for adding menu item.



But it showing error.



Imports Microsoft.VisualBasic

Imports System

Imports System.Windows.Forms

Imports Microsoft.Practices.CompositeUI

Imports Microsoft.Practices.CompositeUI.UIElements

Imports Microsoft.Practices.CompositeUI.WinForms

Imports Microsoft.Practices.CompositeUI.Commands

Imports Microsoft.Practices.CompositeUI.Services



Public Class TestShellApplication : Inherits FormShellApplication(Of WorkItem, TestShellForm)

<STAThread()> _

Public Shared Sub Main()

Dim app As New TestShellApplication

app.Run()

End Sub

Protected Overrides Sub AfterShellCreated()

Dim menu As New MenuStrip

menu = Shell.MainMenuStrip

RootWorkItem.UIExtensionSites.RegisterSite("MainMenu", Shell.MainMenuStrip) //Error :No UIElementAdapterFactory register for type system.windows.Forms.MenuStrip.

Dim exitFileMenu As New MenuItem

exitFileMenu.Text = "Exit"

RootWorkItem.UIExtensionSites("Menu").Add(exitFileMenu)

End Sub



End Class



Can any one help me to solve this problem.



Thank You,

Nov 12, 2007 at 10:18 AM
Exception:
An unhandled exception of type 'System.ArgumentException' occurred in Microsoft.Practices.CompositeUI.dll
Additional information: No UIElementAdapterFactory register for type <t>

When could it occur:
Per the evident message the UI elements being registered as CAB UI sites do not support UIElementAdapterFactory

Solution:
Ask for UIElementAdapterFactory implementation from your control development team
or
Ask for UIElementAdapterFactory implementation from your third part control development team

In case of Infragistics controls:
Read on-
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=10077