SlideShare a Scribd company logo
Silverlight 4 Breaks Free Bruce Johnson ObjectSharp Consulting bjohnson@objectsharp.com 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?

More Related Content

Viewers also liked

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

Viewers also liked (16)

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

Silverlight 4 Out Of Browser

Editor's Notes

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