private void MetroWindow_Closed(object sender, EventArgs e)
        {
            _remoteControl?.Release();
            _fullScreenWindow?.Close();
            OnRemove?.Invoke(this, new EventArgs());
            Window mainWindow = Application.Current.MainWindow;

            if (mainWindow != null)
            {
                _itemRemoteLink.ExternalWindowWidth  = mainWindow.Width == Width ? 0 : Width;
                _itemRemoteLink.ExternalWindowHeight = mainWindow.Height == Height ? 0 : Height;
            }
            Database.Update(_itemRemoteLink.Id, _itemRemoteLink);
        }
 private void _tabItem_Closed(object sender)
 {
     _remoteControl?.Release();
     _fullScreenWindow?.Close();
     OnRemove?.Invoke(this, new EventArgs());
 }