[Ironruby-core] Manipulating Silverlight controls dynamically from IronRuby - is it currently possible ?

Jimmy Schementi Jimmy.Schementi at microsoft.com
Thu Apr 24 23:33:17 EDT 2008


Hey Thibaut, sorry for the very delayed response ...

Every Silverlight object you place on a page is sandboxed, so other Silverlight objects cannot access each other. So a Silverlight greasemonkey-esk thing isn't really possible. =( When you create a Silverlight object, you implicitly say whether you want to use the Silverlight 1 or Silverlight 2 behavior with the 'source' attribute; when you give it a XAML file:

<params source='foo.xaml' />

You're saying you want to use Silverlight 1, which bypasses the CLR and gives you JavaScript programmability of the Silverlight visual elements. However, when you give it a xap file:

<params source="foo.xap" />

You're saying you want to use Silverlight 2, which gives you Ruby, Python, C#, etc. Unfortunately, there's no way to combine these "modes", so you can have native JavaScript and .NET languages both manipulating the Silverlight control. However, if you're just using HTML, you *can* use Ruby to monkey-patch the page. =)

Hope that answers your questions,
~Jimmy

From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barrère
Sent: Tuesday, April 08, 2008 5:42 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] Manipulating Silverlight controls dynamically from IronRuby - is it currently possible ?

Hi Ivan,

thanks a lot for all this, that will definitely be useful!

> Is it currently possible to add children to an existing Silverlight control from the ruby code side ?

Any hint most welcome on that point too !

cheers

-- Thibaut
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080424/0ced85c0/attachment-0001.html 


More information about the Ironruby-core mailing list