WPF常用方法示例
1、WPF弹出确定和取消的选择框MessageBox
MessageBoxResult dr = MessageBox.Show("确定要删除吗?", "提示", MessageBoxButton.OKCancel, MessageBoxImage.Question); if (dr == MessageBoxResult.OK) { //添加一些操作 }
2、WPF程序内存回收释放
public partial class App : Application { LierdaCracker cracker = new LierdaCracker(); protected override void OnStartup(StartupEventArgs e) { cracker.Cracker(); base.OnStartup(e); } }