title: Xamarin Forms - force a control to refresh value from binding
body: <p>Given the following ViewModel...</p>
  
  <pre><code>public class NameEntryViewModel 
  {
      public NameEntryViewModel()
      {
          Branding = new Dictionary&lt;string, string&gt;();
  
          Branding.Add("HeaderLabelText", "Welcome to the app");
      }
  
      public Dictionary&lt;string, string&gt; Branding { get; set; }
  }
  </code></pre>
  
  <p>Bound to the page...</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               x:Class="Monaco.Forms.Views.NameEntryPage"&gt;
  
          &lt;Label Text="{Binding Branding[HeaderLabelText]}" /&gt;
  
  &lt;/ContentPage&gt;
  </code></pre>
  
  <p>When the page comes up the Label will get the text 'Welcome to the app'.  This works great and fits into our plan for being able to customize and globalize our app.  Then Branding dictionary is statically set in this example, but in the real world it is initialized by data from a service call.</p>
  
  <p>However, should the user want to switch the language to Spanish, we would need each bound label to update to the new value.  It's easy enough to reset the Branding dictionary and fill it with Spanish translations, but how can we force the controls to refresh from their bound sources?</p>
  
  <p>I am trying to avoid two-way data binding here b/c we don't want the code overhead of creating a backing property for each Text property of the controls.  Hence we are binding to a dictionary of values.</p>
  
  <p><strong>ANSWER</strong></p>
  
  <p>I accepted the answer below, but I didn't use a traditional property setter.  Instead when a user wants to toggle a different language, we now have a centralized handler that repopulates our Dictionary and then notifies of the change to the Dictionary.  We are using MVVMCross, but you can translate to standard forms...</p>
  
  <pre><code>    public MvxCommand CultureCommand
      {
          get
          {
              return new MvxCommand(async () =&gt;
              {
                  _brandingService.ToggleCurrentCulture();
                  await ApplyBranding(); // &lt;-- this call repopulates the Branding property
                  RaisePropertyChanged(() =&gt; Branding);
              });
          }
      }
  </code></pre>