SlideShare a Scribd company logo
Silverlight 4 Breaks FreeBruce JohnsonObjectSharp Consultingbjohnson@objectsharp.comTwitter: @LACanuck
Silverlight 4Revenge 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 accessFull-keyboard access in kiosk modeCross-domain network accessDrop target for drag-drop functionality
But I’m a Mac!!???
What About My Own Components?

More Related Content

PPTX
Get plugged in with HCL Connections
PPTX
Shoot me NOW! The Life and Death of an O365 Admin and User
KEY
What's the Deal with Phing?
PPTX
What were you thinking? Worst Translation Practices
PPTX
My Dog Ate My Translation Assignment
PPT
Lessons Learned from the DICOM Standardization Effort Lessons Learned from ...
PPT
Hyperhidrosis Hyperhidrosis
PDF
INTEGRATION OF LEPROSY REHABILITATION SERVICES INTO THE MAINSTREAM OF PHYSICA...
Get plugged in with HCL Connections
Shoot me NOW! The Life and Death of an O365 Admin and User
What's the Deal with Phing?
What were you thinking? Worst Translation Practices
My Dog Ate My Translation Assignment
Lessons Learned from the DICOM Standardization Effort Lessons Learned from ...
Hyperhidrosis Hyperhidrosis
INTEGRATION OF LEPROSY REHABILITATION SERVICES INTO THE MAINSTREAM OF PHYSICA...

Viewers also liked (16)

PDF
104 O Haver Handout
PPTX
Whats New In Silverlight 3
PPT
Meow Hagedorn
PPT
VIReC Cyber Seminar Series 2006 VIReC Cyber Seminar Series 2006
PPT
Minnesota HIPAA Collaborative Minnesota HIPAA Collaborative
PPTX
Silverlight 4 and Expression Blend
PPT
Teaching Using Portable Ultrasound
PPTX
Data Bondage in WPF
PPT
The Science Diabetes Control
PPT
PowerPoint Presentation
PPT
Community Acquired Pneumonia Fmdrl
PPT
Common Skin Conditions Part 1 199
PPT
Common Skin Conditions Part 2 200
PPT
Multiple Sclerosis[1]
PPT
Fever And Rash
PPT
THE TAPE STRIPPING TECHNIQUE TO QUANTIFY DRUGS THROUGH OUT THE SKIN THE TAP...
104 O Haver Handout
Whats New In Silverlight 3
Meow Hagedorn
VIReC Cyber Seminar Series 2006 VIReC Cyber Seminar Series 2006
Minnesota HIPAA Collaborative Minnesota HIPAA Collaborative
Silverlight 4 and Expression Blend
Teaching Using Portable Ultrasound
Data Bondage in WPF
The Science Diabetes Control
PowerPoint Presentation
Community Acquired Pneumonia Fmdrl
Common Skin Conditions Part 1 199
Common Skin Conditions Part 2 200
Multiple Sclerosis[1]
Fever And Rash
THE TAPE STRIPPING TECHNIQUE TO QUANTIFY DRUGS THROUGH OUT THE SKIN THE TAP...
Ad

Silverlight 4 Out Of Browser

Editor's Notes

  • #3: 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. 
  • #4: Demo how to create a Silverlight application that supports out-of-browser and elevated privileges
  • #6: Demo how to write files locally
  • #7: Demo reading a local file
  • #8: Demo running an application
  • #15: 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);
  • #16: 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. 
  • #17: [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!"); }}