title: Expander control in WPF
body: <p>I need to replace my button control from below to Expander control.</p>
  
  <pre><code>&lt;Button Grid.Row="14" Grid.ColumnSpan="2" Content="{Binding InspectionLayoutAdvancedButtonContent, Mode=OneWay}" HorizontalAlignment="Stretch" Margin="10,3" MinWidth="120"
                              Command="{Binding Path=AdvancedCommand}" Visibility="{Binding SelectedEditingLayoutViewModel.AdvancedButtonVisibility}"
                              CommandParameter="{Binding ElementName=gridAdvances}"/&gt;
  </code></pre>
  
  <p>I don't know how to add Command to Expander control, so when Expander is expanded I would like to execute AdvancedCommand with parameter gridAdvanced.</p>
  
  <p>How would be best way to implement this ?</p>
  
  <p>Thanks. </p>