Previously 🔗, we took off our socks and put our feet into the sand, and wrote our first C# Console application. We built on it and added the ability to complete a web request and even parsed some JSON as well! Along the way, we learned a bit of how things work in C# and some background on programming terms and functionality.
In this post, we will take our code and port it over to run on .net core, and hook up the results to the GUI. Stick with me here, and by the end you’ll have a framework you can modify to list your Twitter followers, your Facebook Feed, or monitor your own blog stats as well.
And if you do modify it…
Then share it! You’ll find a “LookWhatIbuilt” folder in the repository. You are encouraged to share screenshots, snippets, even your own whole project if you like, by sending a PR. Once we have a few of these, we’ll do a Spotlight post highlighting some of the cool things people are doing,
Cracking open the IoTDefaultApp
When we imaged our rPi with the Iot Dashboard, it wrote the OS and also delivered the ‘IoT Core Default App’ to the device. It’s pretty slick looking and gives us a very good jumping off point to reskin things and have our app look nice. We can view the code for the 🔗 Default App here on the MS IoT GitHub .
Since this is ‘babies first application’ we are going to modify this existing app to suit our purposes. Download the sample from the link above and then double-click the Visual Studio Project
.SLN file. There’s kind of a lot going on when you first open it, but the file we want to edit is
Over in the Solution Explorer in the right-gutter, expand out to IotCoreDefaultApp \ Views then click MainPage.xaml.
Here is the template we’re going to be modifying.
There’s kind of a lot going on here too, so I recommend that you power on your Pi now and see what the default app looks like, here’s a screen shot… Continue reading