title: Creating a save/load function with MVVM
body: <p>I am trying to create a function that can save/load in XML format. The problem is that I am doing something wrong with the MainViewModel that leads to some errors. I done it this way and commented where I get the errors and which:</p>
  
  <pre><code>namespace Editor
  {
      public class MainViewModel : INotifyPropertyChanged
      {
  
          private double _x;
          private object _content;
          public object Content
          {
              get { return _content; }
              set
              {
                  _content = value;
                  OnPropertyChanged(nameof(Content));
              }
          }
  
          public double X
          {
              get { return _x; }
              set
              {
                  _x = value;
                  OnPropertyChanged(nameof(X));
              }
          }
  
          public ICommand BtnLoadCommand { get; }
  
          public ICommand BtnGemCommand { get; }
  
          public double Y { get; set; }
  
          public MainViewModel()
          {
              Content = new Save_Load(); //the type or namespace could not be found are you missing an assembly 
              BtnLoadCommand = new RelayCommand(Load); //cannot convert from method group to action
              BtnGemCommand = new RelayCommand(Save); //cannot convert from method group to action
          }
  
          private void Load(object sender, EventArgs e)
          {
              OpenFileDialog loadfiledialog = new OpenFileDialog();
              if (loadfildialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
              {
  
              }
          }
  
          private void Save(object sender, EventArgs e)
          {
              SaveFileDialog gemfiledialog = new SaveFileDialog();
              if (gemfildialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
              {
  
              }
  
          }
  
          public event PropertyChangedEventHandler PropertyChanged;
  
          private void OnPropertyChanged(string propertyName)
          {
              if (PropertyChanged != null)
                  PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
          }
      }
  }
  </code></pre>