protected void OnSwitched(OnOffSwitchedEventArgs args) { if (this.Switched != null) { this.Switched(args); } if (!args.Cancel) { Switch(); } }