Databinding in WPF against IronRuby objects

All,

I posted this on StackOvervlow, but I thought I would notify this list
of my
question, in case someone here understands what is going on…

Basically, I am finding that data binding to properties on IronRuby
objects
works for some controls, but fails on others. I have an example of it
here:

Anyone have any idea why this happens?
Brian

I find IronRuby types hard-to-work-with sometimes when it comes to WPF
data
binding. What I do as a workaround is creating the data entity classes
in C#
and initialize them from IronRuby code.

To fix your sample WPF app, I used the CLR string instead of IronRuby’s.
So
instead of:

def initialize
  @ImageLocation = "http://www.ironruby.net/@api/deki/site/logo.png"
end

You need to do:

def initialize
  @ImageLocation =

http://www.ironruby.net/@api/deki/site/logo.png”.to_clr_string
end

Shay.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs