This article describes an All-In-One Code Framework sample that is available for download. The code sample demonstrates how to interoperate with COM components and how to export data to Notepad or Microsoft Excel.
To download this code sample, click the following link:
Preconditions for interoperating with COM components in Silverlight 4
Interoperating with COM components is a new feature in Silverlight 4.To interoperate with COM, you must be running Silverlight 4 SDK, and you must enable the Require elevated trust when running outside the browser checkbox inthe Out-of-Browser Settings dialog box. To determine whether this feature is available, run the following code:
Run the following code to send keystrokes to Notepad by using the SendKeys method:
This code sample contains the following programming languages:
To run this code sample, you must be running the following products:
Silverlight 4 Tools for Visual Studio 2010
Silverlight 4 runtime
Microsoft Office 2007 or a later version of Microsoft Office
What is All-In-One Code Framework?
All-In-One Code Framework shows most Microsoft development techniques by using code samples in different programming languages. Each example is carefully selected, composed, and documented to show one common code scenario. For more information about All-In-One Code Framework, visit the following Microsoft website:
Microsoft corporation and/or its respective suppliers make no representations about the suitability, reliability, or accuracy of the information and related graphics contained herein. All such information and related graphics are provided "as is" without warranty of any kind. Microsoft and/or its respective suppliers hereby disclaim all warranties and conditions with regard to this information and related graphics, including all implied warranties and conditions of merchantability, fitness for a particular purpose, workmanlike effort, title and non-infringement. You specifically agree that in no event shall Microsoft and/or its suppliers be liable for any direct, indirect, punitive, incidental, special, consequential damages or any damages whatsoever including, without limitation, damages for loss of use, data or profits, arising out of or in any way connected with the use of or inability to use the information and related graphics contained herein, whether based on contract, tort, negligence, strict liability or otherwise, even if Microsoft or any of its suppliers has been advised of the possibility of damages.
Microsoft Visual Studio 2010 Professional, Microsoft Visual Studio 2010 Ultimate, Microsoft Office 2007 Compatibility Pack Service Pack 1, Microsoft Office 2007 Service Pack 2 for Language Interface Pack