So, lets say I have two nearly identical classes in C# and Ruby:
C#
public class Test
{
public Test()
{
ImageLocation = "http://www.ironruby.net/@api/deki/site/logo.png";
}
public string ImageLocation { get; set; }
}
Ruby
class Test
attr_accessor :ImageLocation
def initialize
@ImageLocation = "http://www.ironruby.net/@api/deki/site/logo.png"
end
end
When I bind to the "ImageLocation" property in C#, all three controls bind properly. When I bind to the same property with the IronRuby object, it works for TextBlock
, but fails for TextBox
and Image
. Here is my XAML:
<Image Source="{Binding ImageLocation}" Width="50" />
<TextBlock Text="{Binding ImageLocation}" />
<TextBox Text="{Binding ImageLocation}" />
Why does the binding work properly for one control, but not the others?