Programmatic binding in Silverlight
Posted
by MojoFilter
on Stack Overflow
See other posts from Stack Overflow
or by MojoFilter
Published on 2008-09-16T13:00:10Z
Indexed on
2010/05/02
23:58 UTC
Read the original article
Hit count: 172
I'm missing the boat on something here, kids. This keeps rearing its head and I don't know what's going on with it, so I hope my homeys here can help.
When working in Silverlight, when I create bindings in my c# code, they never hold up when the application is running. The declarative bindings from my xaml seem ok, but I'm doing something wrong when I create my bindings in C#. I'm hoping that there is something blindingly obvious I'm missing. Here's a typical binding that gets crushed:
TextBlock tb = new TextBlock();
Binding b = new Binding("FontSize");
b.Source = this;
tb.SetBinding(TextBlock.FontSizeProperty, b);
© Stack Overflow or respective owner