You should just be able to use File.WriteAllLines
with the RichTextBox.Lines
property, as File.WriteAllText
and File.AppendAllText
is going to ignore you line formatting.
Example
string filename = saveFileDialog1.FileName;
File.WriteAllLines(filename, richTextBox1.Lines);