private void Save_OnClick(object sender, RoutedEventArgs e) { if (!Validate()) return; using (var dataStorage = new DataStorage()) { dataStorage.SaveItem(_item); } MessageBox.Show("Item has been saved successfully.", "Success"); }