Introduction:In this article, we will see how to use COM in a Silverlight OOB Application.Creating Silverlight OOB Application:Fire up the VS 2010, create Silverlight Application and Name it SLOOBAppWithWindowsLib. The important thing to have in mind while creating an OOB Application is to enable the OutOfBrowser checkbox in Silverlight application properties window. In Window 1, the left side arrow shows the checkbox to be unchecked to enable the Silverlight application as OOB application. The next arrow indicates the button to be clicked which pop ups the Window 2.In Window 2, the Red Rectangular has two checkboxes. The first one enables the Silverlight application to have an option to install menu on application Right-Click.If the second checkbox is enabled, then the Silverlight gives some functionality to your application such as accessing MyDocument Root path. Creating Windows Class Library Project:Right-Click the solution and choose Add -> New Project. In this project, we could have our COM do something, which cannot be done in Silverlight application. However, as a simple application, we are writing a simple COM object that returns a string.Creating COM:The image below shows the Class and Method used in the COM. In the COMForSilverLight project, create a class COMForSilverLight. In the figure above, Note 1 shows the [ProgId ("COMForSilverlight")], which is the programmatic identifier for the COM.The following list shows a few common ProgId values:
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: