Browse Source

MessageBox: fixed issue where it is possible for the button in the click event handler to be null.

import/raw
brianlagunas_cp 15 years ago
parent
commit
11a71789d4
  1. 4
      Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/MessageBox.cs

4
Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/MessageBox/Implementation/MessageBox.cs

@ -512,6 +512,10 @@ namespace Microsoft.Windows.Controls
private void Button_Click(object sender, RoutedEventArgs e)
{
Button button = e.OriginalSource as Button;
if (button == null)
return;
switch (button.Name)
{
case "PART_NoButton":

Loading…
Cancel
Save