in

WPF Design and Development

IdentityMine Team Blogs

David Kelley

A day in the life of a humble software architect... doing C#, WPF, Silverlight, Legos, Fuzzy Logic AI and/or whatever is the latest and greatest or more importantly the coolest techo mumbo jumbo...

Silverlight.js 2.1

alot of the Silverlight 1.0 samples using javascript include a library called 'Silverlight.js' and then another file that has a function called 'createSilverlight' that you have to hard code your Silverlight class name so that it is created and the xaml is pulled in dynamically sort of...  Anyway Javascript has this cool little function called 'eval' so I redid this function so that you only need to have one for all your Silverlight apps with creating a bunch of version of this.  So it made since to add it to the library so that all I need is my application code and this library and Im good.

So the biggest change is really the first light of the function.  So instead of

var scene = new HelloWorldSilverlightClass();

you just put in this line:

var scene = eval( 'new ' + Id + '();');

and now it works for everyone for all the Silverlight classes.

Comments

No Comments

About david.kelley

David for the past 10 years has focused on distributed application design and emerging Microsoft technologies on the web. Having helped design and build some of the largest systems for companies like Microsoft, Onyx Software, Saltmine, Giordanous Group and more and of course our favorite company Identitymine, he has been on the leading edge of applying the latest tech to real world business problems. David’s technology breadth includes everything from SQL Server to Windows/WCF and Silverlight. David’s accomplishments also include developing new technologies such as self editing XML files and related XML technologies to fuzzy logic systems and advanced web user interface design.
© 2007 IdentityMine, Inc.
Powered by Community Server (Commercial Edition), by Telligent Systems