public async Task OpenAsync(StorageFile path) { var text = await ReadTextAsync(path); if (!Encoding.DecodedSuccessfully()) { toolbarStateService_.IsPaneOpen = true; await DialogBox.ErrorInvalidEncodingAsync(); Encoding.ResetDecoderFallback(); return; } SetTextContent(text, false); Path = path; Filename = path.Name; IsModified = false; }