[Solved] Display a text file onto a text block which is already within the app [closed]


This code loaded file from your project directory and show it in TextBlock with a name textBlock

var rs = Application.GetResourceStream(new Uri("file.txt", UriKind.Relative));
StreamReader sr = new StreamReader(rs.Stream);
textBlock.Text = sr.ReadToEnd();

Where file.txt saved like Content in your project

1

solved Display a text file onto a text block which is already within the app [closed]