How to: Convert an Image to Grayscale

I ran across an issue where I wanted to convert an Image in a Windows Store app  to grayscale and could not find a great example.  So… here is one for you to try! private async Task imageToGrayscale(Image src, Image dest) { RenderTargetBitmap renderTargetBitmap = new RenderTargetBitmap(); //Get existing src pixels in a Byte[] (always…

4

Use PasswordVault to Store Your Tokens–Windows Azure Mobile Services

There was no end to end sample of how you might use the PasswordVault to store your JWT used for user authentication in Mobile Services.  I created this class to be used with your Windows Store app. Copy Code: using Microsoft.WindowsAzure.MobileServices; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Windows.Security.Credentials; namespace MobileServices.Samples.Authentication…

0

How To: Decode Event Viewer logs to see What Tile Notification data is

Using Push Notifications for my Windows Store app I needed to debug what message was being received for my Tile Notifications.  The payload however was just a hex blob and THAT wasn’t too useful.  Here is what I did to find the payload and see what was in it. Using the Event Viewer you can…

1

How do I figure out what the hex error codes from WinJS.xhr are?

These codes are hex representations of the underlying WinINet error codes.  You can use calc to translate the code from hex to decimal and then look up that error here: http://support.microsoft.com/kb/193625 To use calc bring up the calculator by hitting the Windows key and typing calc.  Then Alt+3 (or use the view menu) to change…

0

Client and Server certificates in Windows Store applications

I answered a couple of certificate questions in the C# Windows Store applications forum that you all may find useful: Provide Client side certificate: http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/0d005703-0ec3-4466-b389-663608fff053 Include Server certificate in manifest so application cantrust an non-trusted or self-issued server certificate: http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/5ec17748-8980-4714-b25a-c3c9192bbefc   Great video describing SelfSigned certs and embedding it in an app: https://channel9.msdn.com/Events/Build/2012/3-127  See at 0:36…

2

How to take a System.Net trace from Windows Store applications (Developer Preview)

In desktop applications and services we frequently take System.Net traces to diagnose issues using the HttpWebRequest class, HttpListener, sockets, smpt etc… (and now the HttpClient classes).  We traditionally use the application configuration file (appname.exe.config) to enable the tracing.  The config file is read and the tracing parameters are used to trace the information we find…

0

Windows 8 on Acer Aspire One Netbook - Screen Resolution etc...

I was anxious to see what real memory usage would look like on my low end netbook.  It was better than Windows 7!  Less than 500M.  One problem I had was the native resolution of my netbook is1024X600 and the will not load Windows Store applications at that resolution.  I found a registry setting however to…

20