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. […]
All posts by
.Bluetooth Communications
using Windows.Devices.Bluetooth.Rfcomm; using Windows.Networking.Sockets;
Hardware Compatability List
Hardware Compatability List https://developer.microsoft.com/en-us/windows/iot/Docs/HardwareCompatList
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 […]
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 […]
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 […]
RPi Using The SPI Interface
See the IO Pins page here for any extensions needed by Visual Studio and to enable the IO pins.
Enabling Hardware Devices & Peripherals For Your Application
Open the Package.appxmanifest file > Capabilities
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 […]
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 […]