private void OpslaanBestand()
 {
     try
     {
         SaveFileDialog dlg = new SaveFileDialog();
         dlg.FileName   = "tekstbox";
         dlg.DefaultExt = ".box";
         dlg.Filter     = "TekstBox document |*.box";
         if (dlg.ShowDialog() == true)
         {
             using (StreamWriter bestand = new StreamWriter(dlg.FileName))
             {
                 bestand.WriteLine(Inhoud);
                 bestand.WriteLine(Vet.ToString());
                 bestand.WriteLine(Schuin.ToString());
             }
         }
     }
     catch (Exception ex)
     {
         {
             MessageBox.Show("Opslaan mislukt" + ex.Message);
         }
     }
 }
        private void OpslaanBestand()
        {
            try
            {
                SaveFileDialog dlg = new SaveFileDialog();
                dlg.FileName   = "tekstbox";
                dlg.DefaultExt = ".box";
                dlg.Filter     = "Textbox Documents |*.box*";

                if (dlg.ShowDialog() == true)
                {
                    using (StreamWriter bestand = new StreamWriter(dlg.FileName))
                    {
                        bestand.WriteLine(Inhoud);
                        bestand.WriteLine(Vet.ToString());
                        bestand.WriteLine(Schuin.ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Opslaan mislukt : " + ex.Message, "Save Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }