title: Bind Enum value to Label XAML
body: <p>I'm using a Enum field to follow the state of my program.</p>
  
  <pre><code>public enum StatiMacchina {
          InAvvio = 1,
          Pronta = 2,
          InLavorazione = 3,
          InMovimento = 4,
          InAttesa = 5,
          InErrore = 6
  }
  </code></pre>
  
  <p>I would to bind the state of the follow field (in the main window) </p>
  
  <pre><code>public StatiMacchina StatoMacchina { get; set; }
  </code></pre>
  
  <p>with a label in XAML.</p>
  
  <pre><code>&lt;TextBlock Text="{Binding Path=StatoMacchina, Converter={StaticResource StatoMacchinaToString}}" /&gt;
  </code></pre>
  
  <p>I use a converter (below the Convert function)</p>
  
  <pre><code>public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) {
          switch ((StatiMacchina)value) {
              case StatiMacchina.InAvvio: return "txt1";
              case StatiMacchina.Pronta: return "txt2";
              case StatiMacchina.InLavorazione: return "txt3";
              case StatiMacchina.InMovimento: return "txt4";
              case StatiMacchina.InAttesa: return "txt5";
              case StatiMacchina.InErrore: return "txt6";
              default: return "Oppss";
          }
      }
  </code></pre>
  
  <p>When my program start the label contains the correct value, but when I update the state of the StatoMacchina variable, the label doesn't get the refresh.
  What can I do??</p>