I tried FileIO.WriteTextAsync(); with many events including Grid.Loaded and RichEditBox.TextChanged, but that method is asynchronous and conflicts with process called previous cycle. As a result, System.IO.FileLoadException with following description:
The process cannot access the file because it is being used by another process.
So what can I do in this case?
The
TextChangedevent is fired too frequently - you can type several characters in a second - handling theTextChangedevent is too heavy for the UI thread.You can do this save operation in a Timer Tick event handler, set an Interval long enough to ensure the operation is completed before the next Tick occurs.