I need to closing charmBar programmatically, how can I do it?
Try focusing on another control. For example, call
this.Focus();