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 Thursday, December 13, 2007 6:51 PM by jesseliberty

Comments

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

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

# 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

Thursday, December 13, 2007 9:08 PM by Test

# Silverlight Cream for December 24, 2007 -- #158

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

Monday, December 24, 2007 10:42 PM by Community Blogs