The Accelerometer class available in UWP starting with version 10240 has an event called Shaken that should be raised when a shake event occurs without having to subscribe to the Accelerometer raw data. This event was never implemented so if you try to use it, it won't work.
On my quest for starting from something already validated I've came along an old post from the Windows Blog for a Windows Phone Shake Gesture Library.
After finding the source code of the library I did a simple port to the UWP which you can find on the ShakeGestures.UWP GitHub repository.
Hope that some of you will find it useful. Btw there is also the Sample application in the same repository.
P.S. Still planning some posts on the new Bluetooth functionality available in UWP SDK for the Creators Update and some from the Anniversary Update and hopefully I will find some spare time soon.