I'm working on a program that i need to check for a text file and put the contents of that text file into a TextBox
. now i've worked with c# windows forms before and i got it working in there, but this is the first time im using UWP. what is the best way to get a string into a textbox?
You should check out some basic UWP sample apps to see how to work with XAML, which is the default user interface markup language. See for example the hello world sample in documentation.
The key for you will be the x:Name
attribute, which will generate a field for your TextBox
, which you can then access from the code-behind to set the Text
property.
An even better solution is to use data-binding, but that requires you to get a bit more familiar with XAML first.