title: WPF How to create a lateral menu like this (Modern-UI)
body: <p>I'm new on WPF and I want to create a lateral menu for my App. Searching for ideas i found this picture:</p>
  
  <p><img src="https://i.stack.imgur.com/mh4tq.png" alt="Modern Menu"></p>
  
  <p>My idea is to add buttons like in the picture one bellow the other. When user click a button it expand the button to show sub menu options. Only one menu should be expanded at a time.
  My first test is to use a listbox, inside use a Expander for each button and then a stackpanel to add sub menu options. It look like this:</p>
  
  <p><img src="https://i.stack.imgur.com/BMJ40.jpg" alt="My first test"></p>
  
  <p>This is my XAML:</p>
  
  <pre><code>&lt;Window x:Class="InterfazOhmio.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow" Height="350" Width="525" Background="Gray"&gt;    
      &lt;Grid&gt;       
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="200"&gt;&lt;/ColumnDefinition&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;ListBox&gt;
              &lt;ListBox.Resources&gt;
                  &lt;Style TargetType="{x:Type Expander}"&gt;
                      &lt;Setter Property="IsExpanded"
             Value="{Binding Path=IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"/&gt;
                  &lt;/Style&gt;
              &lt;/ListBox.Resources&gt;
              &lt;ListBox.Template&gt;
                  &lt;ControlTemplate TargetType="{x:Type ListBox}"&gt;
                      &lt;ItemsPresenter/&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/ListBox.Template&gt;
              &lt;ListBox.ItemContainerStyle&gt;
                  &lt;Style TargetType="{x:Type ListBoxItem}"&gt;
                      &lt;Setter Property="Template"&gt;
                          &lt;Setter.Value&gt;
                              &lt;ControlTemplate TargetType="{x:Type ListBoxItem}"&gt;
                                  &lt;ContentPresenter Content="{TemplateBinding Content}"/&gt;
                              &lt;/ControlTemplate&gt;
                          &lt;/Setter.Value&gt;
                      &lt;/Setter&gt;
                  &lt;/Style&gt;
              &lt;/ListBox.ItemContainerStyle&gt;
  
              &lt;Expander Background="GreenYellow"  Width="243" Header="Pedidos"&gt;                
                  &lt;StackPanel&gt;                    
                      &lt;RadioButton Margin="20,5,5,5" Content="Nuevo Pedido" GroupName="Two"/&gt;
                      &lt;RadioButton Margin="20,5,5,5" Content="Consultar Pedidos" GroupName="Two"/&gt;
                      &lt;RadioButton Margin="20,5,5,5" Content="Pedidos Pendientes" GroupName="Two"/&gt;
                  &lt;/StackPanel&gt;
              &lt;/Expander&gt;
              &lt;Expander Background="BurlyWood" Width="243" Header="Remitos" Expanded="Expander_Expanded"&gt;
                  &lt;StackPanel&gt;
                      &lt;RadioButton Content="Nuevo Remito" GroupName="Two"/&gt;
                      &lt;RadioButton Content="Consulta de Remitos" GroupName="Two"/&gt;
                      &lt;RadioButton Content="Remitos Pendientes de Facturar" GroupName="Two"/&gt;
                  &lt;/StackPanel&gt;
              &lt;/Expander&gt;
              &lt;Expander Background="OrangeRed" Width="243" Header="Facturas de Ventas"&gt;
                  &lt;StackPanel&gt;
                      &lt;RadioButton Content="Nueva Factura" GroupName="Two"/&gt;
                      &lt;RadioButton Content="Consulta Facturas" GroupName="Two"/&gt;                    
                  &lt;/StackPanel&gt;
              &lt;/Expander&gt;
          &lt;/ListBox&gt;        
      &lt;/Grid&gt;    
  &lt;/Window&gt;
  </code></pre>
  
  <p>So it has the behavior i wanted but not very similar in aspect. How can I improve this to make it more like the first image? Thanks!</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>What i want is to add an icon next to every group title like te buttons above and idealy replace the expander icon, then I replace the RadioButtons with Hyperlinks. Thanks!</p>