Jesse Liberty - Silverlight Geek

By, For and About Silverlight Developers

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).

Comments

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

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

# December 13, 2007 7:24 PM

Test said:

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

# December 13, 2007 9:08 PM

Community Blogs said:

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

# December 24, 2007 10:42 PM