Change the algorithm of wpfcheckbox
Refactor wpfcheckbox()