So I’m starting to work with UWP apps, and I’m continuing to build my C# skills as I go but I’m hitting a wall here. I want to take input from two textboxes, and when a button is selected, provide the output.
The bog-standard C# would be…
static void Main(string[] args)
{
Console.WriteLine(“Input 1”);
string input1;
input1 = Console.ReadLine();
Console.WriteLine(“Input 2”);
string input2;
input2 = Console.ReadLine();
Console.WriteLine(input1 + ” ” + input2);
Console.ReadLine();
}
I’m not sure what the best way to display the result in a UWP app would be. I originally thought that a message box would be right, but… Between trying to find documention on UWP message boxes, and just thinking more about it, I want it to appear in the window, and I’d like to use a TextBlock so that it simply appears, no border. But there’s scant little documenation on that as well.
So… how does one write to a UWP TextBlock?
skane2600
<blockquote><a href="#116702"><em>In reply to jimchamplin:</em></a></blockquote><p>Sometimes you get good answers, but there are those who try to convince you that you don't really want to do what you want to do, or are fixated on whether your question is appropriate given the site's arcane rules. The irony is that people often provide some of the most useful answers to questions other people have labeled as inappropriate. Then you have to earn some minimum reputation before you can answer a question. I guess some people really get excited over reputation and badges, but I find it rather juvenile.</p>
skane2600
<blockquote><a href="#116706"><em>In reply to jimchamplin:</em></a></blockquote><p>Don't be too hard on your code. IMO the dev community has become too fixated on "best practices" sometimes to the detriment of code that satisfies its requirements with a minimum of bugs delivered in a reasonable amount of time.</p>