Hi Scotty,
Thanks for the link. I had a little trouble navigating through the Visual Studio 2017 environment. (Haven't been doing VB since version 2008, so I had a bit of a learning curve to tackle.)
Anyway, I got it working!
Here's what I had to do:
Add reference:
Windows IoT Extensions for the UWP
At top of MainPage.xaml.vb:
Imports Windows.System
In my btnShutDown_Click event
ShutdownManager.BeginShutdown(ShutdownKind.Shutdown, TimeSpan.FromSeconds(0))
In my timer event
If activeShutDownpinIn.Read = GpioPinValue.Low Then
'ShutDown the device.
ShutdownManager.BeginShutdown(ShutdownKind.Shutdown, TimeSpan.FromSeconds(0))
End If
In Package.manifest
xmlns:iot="
http://schemas.microsoft.com/appx/manif ... /windows10" (This is in the Package section.)
<iot:Capability Name="systemManagement" /> (This is in the Capabilities section.)
The environment complained about invalid child object but I saw another post that said to ignore it. I did and it worked.!
Thanks for the link! Cheers