Windows Runtime – Special Characters in JSON (Parsed as HTML)


My app in progress uses a JSON data file that is parsed as HTML so that I can add bold and other useful HTML attributes to my data.

Until today, none of the special characters that I used within my bold tags presented any issues: *, ?, [ ], { }, !, >, >>

But, when I got the to the less than sign it was parsed as the opening of another HTML tag, and broke my lovely bold tags!

The solution was simple enough – simply encode the less than sign as I would in standard HTML, thus: <

So even though it works on WordPress, this is wrong:


And this is right:


Happy coding!

Windows Runtime – C# Send EMail from App


I’m working on my About page for a Windows Phone Runtime app and needed to be able to send an email for feedback or support issues.

Below is the code for my event handler in the code behind (AboutPage.cs):

        async private void Image_Email(object sender, TappedRoutedEventArgs e)
            //Define email address to send to
            EmailRecipient sendTo = new EmailRecipient()
                Address = ""

            //New email and define email subject
            EmailMessage mail = new EmailMessage();
            mail.Subject = "Linux Essentials - Feedback";

            //Add addressee to email

            //Open share contact with email only
            await EmailManager.ShowComposeNewEmailAsync(mail);

The XAML on my About page is simply an image with the Tapped event:

      <Image Source="Assets/Images/Mail.png"

When defining a new email you can also specify the mail body text:

mail.Body = "this is the Body";


Windows Phone Dev – Setting Style Properties for ListView


I wanted to style the background color for my ListView – so first I defined my style (ListViewBorder), in App.xaml:

<Style x:Key="ListViewBorder"
       <Setter Property="Template">
               <ControlTemplate TargetType="ListViewItem">
                   <Border Name="Border"
                       <ContentPresenter />

Then I bound my ListViewBorder to the ItemContainerStyle:

<Grid Grid.Row="1"
       <ListView x:Name="groupListView"
                 ItemsSource="{Binding AllGroups}"
                 ItemContainerStyle="{StaticResource ListViewBorder}"
                 ItemTemplate="{StaticResource RecipeGroupDataTemplate}"
                 Margin="0,10,0,0" />

Here’s the before and after results:


Custom ListView color



Windows Phone 8 Dev – Adding the Tilt Animation


On Windows Phone the Tilt animation is the subtle effect that is employed when you tap on an item and expect an action. It provides visual feedback that something is about to happen. You will see this effect every time you tap a tile on your on your Windows phone.

This effect requires the Windows Phone Toolkit to be installed so let’s take care of that first.

In Visual Studio click the Tools menu, Nuget Package Manager and then Package Manager Console. At the Package Manager prompt type the following:

install-package wptoolkit

Next add the toolkit namespace prefix to the page you are working on:


To enable the Tilt effect on the page simply add this within the phone:PhoneApplicationPage tags:


This will enable the Tilt effect for the entire page.

It should not have any performance hit on your application and it is a nice bit of polish to add to your app.


Windows Phone 8.1 – ‘Resuming’ on Lock Screen


My Windows Phone 8.1 has been ‘Resuming’ on the lock screen for a little while now, quite uncharacteristically.

I had recently un-installed Live Lock Screen Beta but it hadn’t occurred to me to check my lock screen settings.

Once I set my Background back to Bing (which is what it was set to before I installed Live Lock Screen Beta) everything was fine.



Windows Phone 8 – Tog Wash App


My first stab at a Windows Phone app was a basic panorama with instructions on how to care for Theratogs.

TheraTogs are orthotic garment systems designed to provide gentle, prolonged muscle stretch and alignment guidance that replicates the manual positioning and supervised therapy that the rehab clinician offers in a typical session.

I spent some time this weekend re-doing this app for the Windows Phone Store (available here).

I used the tabbed interface with pivot animation provided by Depechie.

For graphics I used Modern IU Icons and SyncFusion Metro Studio 3.

The navigation icons are defined in XAML which is really cool – this is something that I really want to learn more about.

This was a fun project to update and put in the Store – I hope that it will be of use to some other people too!

Complete instructions for TheraTog care can be found here.