Thank you for sharing your solution with the community.
I can also suggest you using the Formatting Options/Format Code Block for pasting source code. Please note there is a "Select Language" DropDown and you need to select C# there. By default it is xml selected.
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos
and start improving your app based on facts, not hunches.