title: Can I bind silverlight controls to DynamicObject.Properties?
body: <p>I have a DynamicObject class that is binded to some controls in silverlight xaml. </p>
  
  <pre><code>class Localizer
  {
      public Strings Strings { get; set; }
  }
  
  public class Strings : DynamicObject
  {
      Dictionary&lt;string, string&gt; values;
  
      public Strings(Dictionary&lt;string, string&gt; values)
      {
          this.values = values;
      }
  
      public override bool TryGetMember(GetMemberBinder binder, out object result)
      {
          string value;
          bool success = values.TryGetValue(binder.Name, out value);
          result = value;
          return success;
      }
  }
  </code></pre>
  
  <p>and bind some controls to this like this:</p>
  
  <pre><code>&lt;TextBlock Text="{Binding Strings.User, Source={StaticResource Localizer}}"/&gt;
  </code></pre>
  
  <p>When I run the application I get this error in VS output:</p>
  
  <p>System.Windows.Data Error: BindingExpression path error: 'Login' property not found on '....Localization.StringsResource' '....Localization.StringsResource' (HashCode=10857028). BindingExpression: Path='Strings.Login' DataItem='....Localization.Localizer' (HashCode=30604389); target element is 'System.Windows.Controls.Button' (Name='btnLogin'); target property is 'Content' (type 'System.Object').</p>
  
  <p>but when read property in code like this:</p>
  
  <pre><code>string UserName = localizer.Strings.Login;
  </code></pre>
  
  <p>It work correctly, is it possible to bind controls to DynamicObject in xaml?</p>