title: Open Buttons ContextMenu on Left Click
body: <p>I have a button with a context menu, my requirements are to show the context menu on left click</p>
  
  <p>The problem is that the <code>&lt;ContextMenu ItemsSource="{Binding LineItems}"</code> isn't being updated/refresh when the context menu opens. However If i right click first, items are loaded fine</p>
  
  <p><strong>XAML</strong></p>
  
  <pre><code>&lt;Button  x:Name="BtnMessageChannel" Click="BtnMessageChannel_Click" Grid.Row="0" Grid.Column="2" Height="23" Width="23" ToolTip="Message Channel" &gt;
      &lt;Button.ContextMenu&gt;
          &lt;ContextMenu ItemsSource="{Binding LineItems}" x:Name="CtxMessageChannel"&gt;
              &lt;ContextMenu.Resources&gt;
                  &lt;Image x:Key="img" Source="{Binding Icon}" x:Shared="false"/&gt;
                  &lt;Style TargetType="{x:Type MenuItem}"&gt;
                      &lt;Setter Property="Header" Value="{Binding DisplayName}"/&gt;
                      &lt;Setter Property="Icon" Value="{StaticResource img}"&gt;
                      &lt;/Setter&gt;
                  &lt;/Style&gt;
              &lt;/ContextMenu.Resources&gt;
          &lt;/ContextMenu&gt;
      &lt;/Button.ContextMenu&gt;
      &lt;Image Source="Images/mail_send.png" HorizontalAlignment="Left" Width="16" /&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p><strong>Code Behind</strong></p>
  
  <pre><code>private void BtnMessageChannel_Click(object sender, RoutedEventArgs e)
  {
     BtnMessageChannel.ContextMenu.GetBindingExpression(ContextMenu.ItemsSourceProperty)
              .UpdateTarget();  
     BtnMessageChannel.ContextMenu.Visibility = Visibility.Visible;
     BtnMessageChannel.ContextMenu.IsOpen = true;
  
  }
  </code></pre>
  
  <p>Is there any easy solutions to this problem?</p>