private void EditBook_Clicked(object sender, RoutedEventArgs e)
        {
            int number;

            if (String.IsNullOrEmpty(TextBoxYear.Text) || String.IsNullOrEmpty(TextBoxAuthor.Text) || String.IsNullOrEmpty(TextBoxTitle.Text))
            {
                MessageBox.Show("non of fields can be empty");
            }
            else if ((!(Int32.TryParse(TextBoxYear.Text, out number))))
            {
                MessageBox.Show("The year must be integer");
            }
            else if (number < 10 || number > 3000)
            {
                MessageBox.Show("The age must be between 10 and 3000");
            }
            else
            {
                BindingExpression author = TextBoxAuthor.GetBindingExpression(TextBox.TextProperty);
                BindingExpression title  = TextBoxTitle.GetBindingExpression(TextBox.TextProperty);
                BindingExpression year   = TextBoxYear.GetBindingExpression(TextBox.TextProperty);

                author.UpdateSource();
                title.UpdateSource();
                year.UpdateSource();
                mainVM.BooksView.Refresh();
                mainVM.UpdateYears();
                this.Close();
            }
        }