public void ClearAppBar() { if (!IsAppBar) { return; } HwndSource.RemoveHook(AppBarHook); APPBARDATA _data = NewData(); NativeMethods.SHAppBarMessage(APPBARMSG.ABM_REMOVE, ref _data); IsAppBar = false; }