WPFDevelopersOrg / WPFDevelopers

🎉 Welcome to follow the "WPFDevelopers" public account! This is a sample project we share daily, covering WPF's basic controls and custom control libraries. The project will be continuously updated, welcome to give us ⭐️
MIT License
1.5k stars 240 forks source link

Bug Fixed: When MessageBoxButton set to YesNo Or YesNoCancel, There will be more one OK Button. #107

Closed SwaggyMacro closed 4 weeks ago

SwaggyMacro commented 4 weeks ago

As the title says.

var result = MessageBox.Show("确定删除该用户吗?", "提示", MessageBoxButton.YesNo, MessageBoxImage.Question, null, 5);
// or var result = MessageBox.Show("确定删除该用户吗?", "提示", MessageBoxButton.YesNoCancel, MessageBoxImage.Question, null, 5);
if (result != MessageBoxResult.Yes)
{
    return;
}

Then, You will get a MessgaeBox like this. image image

Set ok and cancel button Visibility will works. image image