using System; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using Sai.RvKits.Operation; namespace SZBIM.StandardTools.ParameterManager { public partial class MetroParamsManagerViewModel : ObservableObject { private static readonly IntPtr revitwindowPtr = Autodesk.Windows.ComponentManager.ApplicationWindow; private RelayCommand tabToggle; [RelayCommand] private void Closed() { WinIntPtr.SetForegroundWindow(revitwindowPtr); KeyPress.keybd_event(0x1B, 0, 0, 0); KeyPress.keybd_event(0x1B, 0, 2, 0); } } }