private void Add(object sender, RoutedEventArgs e)
        {
            var dialog = new WpfLanguageDialog();

            dialog.Language = new Language();
            var result = dialog.ShowDialog();

            if (result.HasValue && result.Value)
            {
                _pageModel.Languages.Add(dialog.Language);
            }
        }
        private void Edit(Language language)
        {
            if (language == null)
            {
                return;
            }

            var copy = language.Clone();

            var dialog = new WpfLanguageDialog();

            dialog.Language = copy;
            var result = dialog.ShowDialog();

            if (result.HasValue && result.Value)
            {
                var index = _pageModel.Languages.IndexOf(language);
                _pageModel.Languages.RemoveAt(index);
                _pageModel.Languages.Insert(index, copy);
            }
        }