title: Binding a string to the tooltip of a button in WPF
body: <p>I am having problems with binding <code>string</code>s.
  When I maximize my window the tooltip of the button should change to &quot;minimize&quot; and if it is at normal size, the tooltip will be &quot;enlarged&quot;.</p>
  <p>This is my XAML code:</p>
  <pre><code>&lt;Button Command=&quot;{Binding MaxWindowCommand}&quot;
          CommandParameter=&quot;{Binding ElementName=ucControlBar}&quot;
          Background=&quot;ForestGreen&quot;
          ToolTip=&quot;{Binding StateMinMax}&quot;
          ToolBar.OverflowMode=&quot;AsNeeded&quot;&gt;
     &lt;materialDesign:PackIcon Kind=&quot;WindowMaximize&quot; /&gt;
  &lt;/Button&gt;
  </code></pre>
  <p>This is my code-behind:</p>
  <pre><code>public string StateMinMax { get; set; }
  </code></pre>
  <pre><code>if (w != null)
  {
     if(w.WindowState != WindowState.Maximized)
     {
        w.WindowState = WindowState.Maximized;
        StateMinMax = &quot;min&quot;;
     }
     else
     {
        w.WindowState = WindowState.Normal;
        StateMinMax = &quot;max&quot;;
     }
  }
  </code></pre>
  <p>I hope someone will help me. Thank you very much.</p>