StreamWriter has a Bug?
<p>this simply writes the text in textbox to the same file each time...I don't understand why it works perfectly if I input new characters or change characters while deleting characters doesn't work...</p>

<pre><code> private void ContentChanged(object sender, TextChangedEventArgs e)
        {
            Console.WriteLine("cur before:" + this.Box.SelectionStart);
            FileStream f = File.Open(path, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite);
            StreamWriter writer = new StreamWriter(f);
            model.Cursor = this.Box.SelectionStart;
            writer.Write(this.Box.Text);
            writer.Close();
            Console.WriteLine("cur after:" + this.Box.SelectionStart);
            Console.WriteLine("write:" + count++);
            Console.WriteLine("after write:" + this.Box.Text);
            Console.WriteLine("after write:" + model.Content);
        }
</code></pre>
