private async void InitGrid()
        {
            _repository = new SnippetRepository();
            var items = await _repository.GetAllAsync();

            if (items == null)
            {
                return;
            }

            snippetListView.ItemsSource = items;

            if (_selectedIndex != -1)
            {
                snippetListView.SelectedIndex = _selectedIndex;
            }
        }