private void AddNewObjectButton_Click(object sender, RoutedEventArgs e)
    {
        Save();

        var nextId = (GameAssets.GameMechanicsTabs.Max(x => x.Id as int?) ?? 0) + 1;

        _dataContext = new GameMechanicsTab
        {
            Id = nextId
        };
        ContentSelectionBox.SelectedIndex = -1;
        RefreshStaticInfoPanel();

        DeleteObjectButton.Visibility = Visibility.Visible;
    }
    private void ContentSelectionBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        var selectedName = (e.Source as ComboBox)?.SelectedValue?.ToString();

        if (selectedName is null)
        {
            return;
        }

        if (_dataContext is not null)
        {
            Save();
        }

        _dataContext = GameAssets.GameMechanicsTabs.FirstOrDefault(x => x.Name == selectedName);
        RefreshStaticInfoPanel();
        DeleteObjectButton.Visibility = Visibility.Visible;
    }
    private void DeleteObjectButton_Click(object sender, RoutedEventArgs e)
    {
        Save();

        var objectToDelete = GameAssets.GameMechanicsTabs.FirstOrDefault(x => x.Id == int.Parse((_controls["IdBox"] as TextBox).Text));

        var result = MessageBox.Show($"Are you sure you want to delete {objectToDelete.Name}? This action will close ContentManager, check Logs directory (for missing references after deleting).", "Are you sure?", MessageBoxButton.YesNo, MessageBoxImage.Question);

        if (result == MessageBoxResult.No)
        {
            return;
        }

        GameAssets.GameMechanicsTabs.Remove(objectToDelete);

        PopulateContentSelectionBox();
        ContentSelectionBox.SelectedIndex = -1;
        _currentPanel.Children.Clear();
        DeleteObjectButton.Visibility = Visibility.Hidden;
        _dataContext = null;

        Application.Current.MainWindow.Close();
    }