• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Silverlight 4 Out Of Browser

Silverlight 4 Out Of Browser



This is my presentation on the Out-of-Browser features of Silverlight 4 that I gave at Toronto Code Camp 2010

This is my presentation on the Out-of-Browser features of Silverlight 4 that I gave at Toronto Code Camp 2010



Total Views
Views on SlideShare
Embed Views



1 Embed 40

http://www.slideshare.net 40



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • Silverlight 4 offers the ability to initialize and use COM+ classes from Silverlight. It should be noted that these features are only available in elevated privileges Out-Of-Browser mode and are not available in-browser.   In Silverlight 4 Com+ Automation only works on Windows machines (but more on that later). The majority of work around Silverlight 4 COM+ support is centered around the ComAutomationFactory and ComAutomationEvent classes. Freaked out? Get over it. Silverlight 4 COM+ Automation is not about authoring, deploying or versioning COM+ components, that is a worst practice for this feature.   The best practice for Silverlight 4 COM+ is to only use common operating system COM+ classes, and not ship your own.Given that best practice, you are just the consumer of some time tested Windows APIs. Using COM+ Windows APIs is no different then consuming the .Net framework, 3rd party frameworks or p/Invoke features. 
  • Demo how to create a Silverlight application that supports out-of-browser and elevated privileges
  • Demo how to write files locally
  • Demo reading a local file
  • Demo running an application
  • Clipboard.GetTextInstallButton.Drop += new DragEventHandler(InstallButton_Drop); InstallButton.DragOver += new DragEventHandler(InstallButton_DragOver); InstallButton.DragEnter += new DragEventHandler(InstallButton_DragEnter); InstallButton.DragLeave += new DragEventHandler(InstallButton_DragLeave);
  • COM+ Automation isn’t supported for Macs in Silverlight 4. For a good reason, Mac doesn’t have COM+. However, Microsoft have stated they are looking into getting COM+ support working in Silverlight 4 RTM on a Mac.Macs have similar programmatic access to COM known as AppleScript. It’s not that hard to read once you remove the added spaces and add some indents. Once you get past the syntax, it’s easy to see those are the same classes and members on a Mac as are available for Windows. The point here is that if Microsoft wants to enable Com Automation-like features on a Mac there are 2 options: 1) Enable executing AppleScripts.This option will let us have the same amount of control on a mac machine as we do on a windows machine. 2) Add an overload to ComAutomationFactory.CreateObject() that calls the “Tell Application” command under the scenes and gets a AppleScript object. This option would work extremely well for Office automation. For any other operating system feature, you’ll have to code OS access twice. 
  • [ProgId("SilverlightCOM.Example")][ClassInterface(ClassInterfaceType.AutoDual)][Guid("5267F53A-0E5F-490A-A891-FFE8B3840D72")]public class ComClass{ [ComVisible(true)] public void RunMe() {System.Windows.Forms.MessageBox.Show("Hello from .NET via COM!"); }}

Silverlight 4 Out Of Browser Silverlight 4 Out Of Browser Presentation Transcript

  • Silverlight 4 Breaks Free
    Bruce Johnson
    ObjectSharp Consulting
    Twitter: @LACanuck
  • Silverlight 4
    Revenge of COM!!!!!
  • Elevated Privileges
  • Checking for Updates
  • Write Files Anywhere
  • Reading a Local File
  • Running an Application
  • Toast, Anyone?
  • Pinning the App to the Taskbar
  • Printing my XAML
  • HTML Hosting
  • Using External Devices
  • Watching a Local File
  • Is there anything else?
    Clipboard access
    Full-keyboard access in kiosk mode
    Cross-domain network access
    Drop target for drag-drop functionality
  • But I’m a Mac!!???
  • What About My Own Components?
  • Questions?
    Twitter: @LACanuck
    Blog: http://www.objectsharp.com/blogs/bruce
    Email: bjohnson@objectsharp.com