Page view counter

Did You Know That... createObjectEx is really just a wrapper around createObject?

As Adam Nathan points out In Silverlight 1.0 Unleashed, Silverlight.createObjectEx is implemented as a function that takes an array as an argument and calls Silverlight.createObject, passing each element of the array in turn.

The reason that many Silverlight programmers prefer to use Silverlight.createObjectEx is that it is relatively self-documenting, and that it is essentially JSON.

Silverlight.createObjectEx({
        source: "Scene.xaml",
        parentElement: document.getElementById("SilverlightControlHost"),
        id: "SilverlightControl",
        properties: {
            width: "800",
            height: "600",
            version: "0.9"
        },
Note: Using the suffix, Ex is a holdover from the days of COM when interfaces were never changed, and so, if an interface was extended its name was often modified by adding Ex (for extended).
Published 13 December 2007 06:51 PM by jesseliberty

Comments

# Did You Know That... createObjectEx is really just a wrapper around createObject? - Jesse Liberty - Silverlight Geek said on 13 December, 2007 07:24 PM

Pingback from  Did You Know That... createObjectEx is really just a wrapper around createObject? - Jesse Liberty - Silverlight Geek

# Test said on 13 December, 2007 09:08 PM

  As Adam Nathan points out In Silverlight 1.0 Unleashed , Silverlight.createObjectEx is implemented

# Community Blogs said on 24 December, 2007 10:42 PM

Merry Christmas from SilverlightCream -- Here's a whole bunch of things that found it's way into