I realized when I set the exit button with attribute IsCancel = True, the Closing event of window will fire twice.

```
    private void exitButton_Click(object sender, RoutedEventArgs e)
    {
        // this button was set attribute IsCancel = True.
        Close();          
    }

    private void BaseWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    {          
        MessageBox.Show("test"); // this message box will show twice
                                 // when you click on the exit button
        e.Cancel = true;
    }

```

Is this a bug of WPF ? Is there a workaround ?

**Ps : Sorry I forgot to say this bug only occurs when you call your window from a parent window.**