title: WPF How to catch ContextMenuClosing event
body: <p>I have the following XAML:</p>
  
  <pre><code>&lt;Grid &gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="20"/&gt;
              &lt;ColumnDefinition Width="*"/&gt;
              &lt;ColumnDefinition Width="20"/&gt;
          &lt;/Grid.ColumnDefinitions&gt;            
          &lt;local:DropDownButton 
              HorizontalAlignment="Right"
              Grid.Column="2"
              Width="18"
              Style="{StaticResource OrangeButton}"   
              ContextMenuClosing="colorPallete_ContextMenuClosing"
              x:Name="btnSelectColor"&gt;            
              &lt;Polygon Points="0,0,5,4,10,0" Fill="Black"/&gt;                                              
              &lt;local:DropDownButton.DropDown&gt;
                  &lt;ContextMenu StaysOpen="True" Name="colorPallete" ContextMenuClosing="colorPallete_ContextMenuClosing"&gt;
                      &lt;MenuItem StaysOpenOnClick="True" OverridesDefaultStyle="True" ContextMenuClosing="colorPallete_ContextMenuClosing"&gt;
                          &lt;MenuItem.Header&gt;
                              &lt;local:ColorPickerPopup x:Name="colorPicker" ContextMenuClosing="colorPallete_ContextMenuClosing"/&gt;
                          &lt;/MenuItem.Header&gt;                                                
                      &lt;/MenuItem&gt;                                            
                  &lt;/ContextMenu&gt;                                        
              &lt;/local:DropDownButton.DropDown&gt;
          &lt;/local:DropDownButton&gt;            
  
          &lt;Rectangle Width="17.5" Stroke="Black" Margin="0" 
                     Fill="{DynamicResource CheckerBrush}"/&gt;            
  
          &lt;Rectangle Width="17.5" Margin="0" Name="rtcColorPreview" /&gt;
          &lt;TextBox Margin="2,0,0,0" Grid.Column="1" 
                   Width="100" BorderThickness="0"                     
                   Text="{Binding ElementName=colorPicker, Mode=TwoWay,  Path=SelectedColorName}"/&gt;
  
      &lt;/Grid&gt;
  </code></pre>
  
  <p>The event handler colorPallete_ContextMenuClosing is not being called when ContextMenu labelled colrPallete is closing.  I cannot seem to figure out what is missing.  </p>
  
  <p>Please help!  TIA.</p>