1、弹出小框
用法:
if (MessageBox.Show("内容", "标题", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes)
{
label1.Content = "yes";
}else{
label1.Content = "no";
}
2、例子
if (MessageBox.Show("是否进行压力变送器系数设定?", "警告", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes)
{
;
}
else
{
;
}
效果: