Posts

Showing posts from July, 2016

Embed a live toast in your Windows 10 Universal App

There is a post " Embed a live tile in your Windows 10 app! " in MSDN blog. I will "extend it" to Preview Toast message in the app. Similar to PreviewTile, you would have add following features in XAML. <Pages: xmlns:visualizer="using:NotificationsVisualizerLibrary" ... > <library:PreviewToast     x:Name="PreviewToastDesktop"     ActivatedBackground="PreviewToastDesktop_ActivatedBackground"     ActivatedForeground="PreviewToastDesktop_ActivatedForeground"     ActivatedProtocol="PreviewToastDesktop_ActivatedProtocol"     ActivatedSystem="PreviewToastDesktop_ActivatedSystem"/> And then ad following lines in your code: //Construct a toast XML payload var payload="<toast><visual><binding template="ToastText01"><text id="1">Hello</text></binding></visual></toast>"; //Initialize the previewToast contral previewT...

Debugging the wrong line in UWP (Universal Windows App) in Visual Studio 2015

I had met a debugging issue which ran into the wrong line such as comments line when debug a referenced .Net project in UWP (Universal Windows App) in Visual Studio 2015. I search around in google and saw some suggestions that convert the source code to ANSI format but it didn't resolve the issue. It took me few hours to found out the Windows Desktop UWP project referenced to the .Net project which was not from the latest build output path "bin\x86\Debug\". Actually it points to path "\bin\ARM\Debug" because it needed debug in "ARM" platform when deploying the Windows phone project to windows phone . I was debugging the wrong project before!!!!     After I refer to the correct project reference, I was able to debug code as normal as usual. :)

Resolve the "HTTP 404" error when calling a Azure Mobile App Service custom API (.NET backend)

I got the "HTTP 404 - method not found" error message when calling a  a Azure Mobile App custom API (.NET backend) from the Universal Windows App (UWP). The custom API is defined as following:         // GET api/GetStorageToken         [HttpGet, Route("api/GetStorageToken/{contName}")]         public async Task<StorageTokenViewModel> GetStorageToken(string containerName)         {                          .....          } I verified this issue and compared with the existing custom API which can be called successfully, and I found out the issue was the parameter name in the custom API different from the line above "   [HttpGet, Route("api/GetStorageToken/{ contName }")] ", once I updated it to    [HttpGet, Route("api/GetStorageToken/{ containerName }")], I can call this API successfully...

Fxied error "DEP0001 : Unexpected Error: -1988945906" while deploying Windows UWP app to a windows phone

I had met a error message "DEP0001 : Unexpected Error: -1988945906" while deploying Windows UWP app to a windows phone. I search the error message in google and then found out a command line " net start IpOverUsbSvc " to resolve the issue. But I still got the same error when deploying the app, and so I power off the phone and then start it again. I try the deploying again (make sure the phone is unlock), and it ran well. The issue was gone!