.File and Folder Locations

File And Folder Locations App Data Private data that an app reads and writes.  Normally not directly exposed to users, and one app cannot view app data from another app. When an app is uninstalled all of its app data automatically gets deleted as well. There are two types: app settings Access available via the Windows.Storage.ApplicationData class. […]

Read More

Capability Declarations for your App

Lots of things are blocked by default for UWP.  You have to enable the capabilities needed by your app in "Package.appxmanifest" Some can be altered using the Capabilities tab of this file in visual mode, but others require you to edit it in code mode (right click > view code) Full list of capabilities https://msdn.microsoft.com/en-gb/windows/uwp/packaging/app-capability-declarations […]

Read More

Wait For Async Task To Complete

Use ManualResetEvent to allow you to wait on your thread with an anync task completes. Global object private ManualResetEvent OurTxIsDone; Constructor OurTxIsDone = new ManualResetEvent(false); Using It In A Method That Does Something Async Example //Inline event handler for the Completed event (We've implemented inline in order to make this method self-contained) MyOtherObjectThatsGoingToDoSomethingAsync.Completed += new EventHandler<SocketAsyncEventArgs>(delegate (object […]

Read More

Reference

Pass A Reference To A Function, Method, etc Passing by reference enables function members, methods, properties, indexers, operators, and constructors to change the value of the parameters and have that change persist in the calling environment. You just use the ‘ref’ or ‘out’ keyword: ‘ref’ tells the compiler that the object is initialized before entering the […]

Read More

RPi Using The UART

Hardware UART and USB UART Adapters Both are usable Enabling The UART For Your Application At the time of writing in Visual Studio the UART isn't an option in Package.appxmanifest > Capabilities and it has to be enabled for you app manually: Right click the Package.appxmanifest file > Open with… > XML (Text) Editor Add the […]

Read More

Page Methods

Page Loaded Method etc Just move the cursor in the .xaml file to before the Grid, then in the right properties select events and double click on the one you want to add (e.g. ‘Loaded’ for page loaded) Built In Methods when using the Frame navigation system of the main window with Pages OnNavigationFrom is […]

Read More