[Ironruby-core] Silverlight and Custom Components

Jimmy Schementi Jimmy.Schementi at microsoft.com
Thu Aug 14 15:53:46 EDT 2008


Dividing things up into UserControls is the Silverlight model for separating UI components. You should be able to use those components from XAML by name, like <MyCustomUserControl />, as well as load them in Ruby using load_component. I suspect the first one doesn’t work, since it’ll require a real CLR type to be defined, and we need to figure out a way to fix that.

I’m going to start moving a good chunk of ironruby-silverlight code that’s currently part of silverline (http://schementi.com/silverline) into the ironruby-contrib project, so others can help me build a good client-side framework for ironruby-silverlight, which will ship on http://codeplex.com/sdlsdk.

That being said, I was going to revisit controls before SL2 ships, so I’d be interested in your solution, and whether or not something along those lines should ship in the SDK.

~Jimmy

On 8/14/08 12:03 PM, "Sean Clark Hess" <seanhess at gmail.com> wrote:

Hi all,

One of the first things I tried to do when I started using IronRuby with Silverlight was to separate my view components into separate components.  I soon learned, to my dismay, that it was way harder than it should be (as in -- harder than flex does it).

The only way to do it is to use Application.current.load_component. I've written a small component framework that does the job nicely (using method_missing to proxy the loaded view ... it's pretty cool), but I want to make sure there isn't a better way to do the same thing before I follow this path any further.

Oh, and please let me know if this is the wrong mailing list for IronRuby Silverilght development :)

If there isn't a RIGHT way to do this, I'm planning on posting the code on my blog in a few days.

Thanks
~sean

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080814/d5833c34/attachment.html>


More information about the Ironruby-core mailing list