title: How to pass ContentControl Element to CommandParameter?
body: <p>I have a toolbar that show many <code>Button</code> with <code>Image</code> and <code>TextBlock</code>.</p>
  
  <p>Then, I create a CommandManager to manager all <code>Button</code>'s commands. So, I want to implement a factory to assign action by <code>Button</code>'s <code>TextBlock</code>.</p>
  
  <p>This is my xaml and Command function, I try to pass all <code>Button</code>'s <code>Text</code>, but I don't know how to do.</p>
  
  <pre><code>&lt;StackPanel&gt;
      &lt;StackPanel.Resources&gt;
          &lt;Style TargetType="{x:Type Button}"&gt;
              &lt;Setter Property="Command" Value="{Binding ActionCommand}"/&gt;
              &lt;Setter Property="CommandParameter" Value="{Binding Path=Text}"/&gt;
          &lt;/Style&gt;
      &lt;/StackPanel.Resources&gt;
      &lt;Button&gt;
          &lt;StackPanel&gt;
              &lt;Image Source="/Resources/ToolBar/open.png"/&gt;
              &lt;TextBlock Text="Open"/&gt;
          &lt;/StackPanel&gt;
      &lt;/Button&gt;
      &lt;Button&gt;
          &lt;StackPanel&gt;
              &lt;Image Source="/Resources/ToolBar/save.png"/&gt;
              &lt;TextBlock Text="Save"/&gt;
          &lt;/StackPanel&gt;
      &lt;/Button&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>ActionManager:</p>
  
  <pre><code>public ICommand ActionCommand { get { return new RelayCommand(_onActionCommand); } }
  
  private void _onActionCommand(object parameter)
  {
      if (parameter == null)
      {
          return;
      }
  
      string buttonContent = parameter as string;
      switch (buttonContent)
      {
          case "Open":
              new OpenWindow().ShowDialog();
              break;
          case "Open":
              new Save();
              break;
      }
  }
  </code></pre>