I copied and pasted all the code on this page (https://msdn.microsoft.com/en-us/library/windows/apps/mt299144.aspx) into App.xaml verbatim, but the application crashes and no information is given as to why. When I remove the overrided template from the style alone, it no longer crashes, but then I can't override the template.
What is the deal here? I've never had this issue when developing classic desktop apps, but UWP seems to make this unnecessarily complicated.