private void OnShowCairoMenu(HotKey hotKey) { if (!CairoMenu.IsSubmenuOpen) { NativeMethods.SetForegroundWindow(Handle); CairoMenu.IsSubmenuOpen = true; } else { CairoMenu.IsSubmenuOpen = false; } }
private void ToggleProgramsMenu() { if (!ProgramsMenu.IsSubmenuOpen) { NativeMethods.SetForegroundWindow(Handle); ProgramsMenu.IsSubmenuOpen = true; } else { ProgramsMenu.IsSubmenuOpen = false; } }