Blog

posts

Tattoo Tester on YouTube

0 Comments
By Fons Sonnemans, 8-3-2011

  I have just published an YouTube video of Tattoo Tester for the Windows Phone. It also shows the new features added in version 1.1.

New Features

  • 122 tattoos included grouped in categories: Tribal's, Animals, Signs, Flowers, Cartoons, Flags and Others
  • add another tattoo
  • mirror tattoo
  • import tattoo

You can now design your own tattoo and import it into the app. Select a picture with a white or transparent background and use it as your custom tattoo. Skip to 2:20 in the video to see this in action.

Download

You can download a trial version or buy for $1.99 the full version. You can then choose from 101 extra tattoo's.

Video

Cheers,

Fons

Animal Sounds game for Windows Phone 7

0 Comments
By Fons Sonnemans, 1-3-2011

  I have just published an YouTube video of my new Animal Sounds game for the Windows Phone. Best of all it's free and doesn't contain any ads.

Description

Click on the animal that makes the sound you hear. A wild, fun, and educational game for young children (2-5 years).

Download

Video

Cheers,

Fons

My LicenseManager class for the Windows Phone

0 Comments
By Fons Sonnemans, 25-2-2011

I have developed a few Windows Phone apps which support a Trial mode. In these WP7 apps I use the static IsTrial property of my LicenseManager class to check if the user is using a paid or trial version. This class uses the IsTrial() method of the Microsoft.Phone.Marketplace.LicenseInformation class if you are running in configuration 'Release' mode. If you are developing and running in configuration 'Debug' mode it will return true if the TRIAL conditional compilation symbol is set in your project properties. This makes it easy to test the Trial mode in your code.

LicenseManager

using System;
using Microsoft.Phone.Marketplace;

namespace ReflectionIT.TattooTester.Helpers {

    internal static class LicenseManager {

        private readonly static bool _isTrial;

        static LicenseManager() {
#if DEBUG && TRIAL
            _isTrial = true;
#else
            _isTrial = new LicenseInformation().IsTrial();
#endif
        }

        public static bool IsTrial {
            get { return _isTrial; }
        }

    }
}

Project Properties

If you want to test Trial mode add the TRIAL conditional compilation symbol. If not remove it or run in configuration 'Release' mode.

Cheers,

Fons

Tattoo Tester Windows Phone 7 App

0 Comments
By Fons Sonnemans, 12-2-2011

I have written a new WP7 application which is now available on the Marketplace.

Tatoo Tester

Description

Want to get a tattoo? Don't know exactly which tattoo to get or where to place it? Use Tattoo Tester to find out which tattoo is perfect for you. Take a photo of yourself, choose a tattoo and place it on your body. Move, pinch, stretch and rotate the tattoo for a right size and location.
Save your picture so you can share it with friends.

Download

You can download a trial version or buy for $1.99 the full version. You can then choose from 90 extra tattoo's.

Screenshots

Cheers,

Fons

Countdown app for Windows Phone 7 Video

0 Comments
By Fons Sonnemans, 17-1-2011

I have created a video demonstrating my latest version of my Countdown app for the Windows Phone 7.

This 1.5 version includes a new Cubic clock which uses 3D Perspective to rotate the hours, days, minutes and seconds. I hope you like it.

Cheers,

Fons

WMAppManifest.xml changes for Silverlight WP7 Games

0 Comments
By Fons Sonnemans, 17-1-2011

Games in the Games Hub of the Windows Phone 7 have larger icons than normal apps. If you are creating a game using Silverlight make sure you change the WMAppManifest.xml file which is located in the Properties folder of your project. You have to set the Genre attribute to 'apps.games'. This will place your game in the Game Hub. You must also change the IconPath from 'ApplicationIcon.png' to 'Background.png'. This image is 173x173 pixels instead of the smaller 62x62 icon which is used for the normal apps. You can even remove the 'ApplicationIcon.png' from your project because it isn't used any more.

WMAppManifest.xml for a Sample App

WMAppManifest.xml for a Sample App

WMAppManifest.xml for a Sample Game

WMAppManifest.xml for a Sample Game

Cheers,

Fons

Silverlight for Windows Phone 7 Toolkit artikel in .NET Magazine

0 Comments
By Fons Sonnemans, 10-1-2011

 

In het laatste .NET magazine heb ik een artikel geschreven over Silverlight for Windows Phone 7 Toolkit. Dit artikel kunt u online lezen maar ook downloaden als PDF. Natuurlijk kan je de sourcecode van de demo applicatie ook downloaden.

Mocht je het magazine niet hebben ontvangen schrijf je dan alsnog in. Het laatste blad wordt dan alsnog opgestuurd.

WP7 Countdown app shown in the CES Keynote

0 Comments
By Fons Sonnemans, 6-1-2011

My Countdown app is shown in the CES Keynote given by Steve Ballmer. Check out the video and FF to 28:37. You will see a Live Tile (Summer Solstice) at the bottom of the start screen of the Windows Phone 7.

Cheers,

Fons

Countdown app for Windows Phone 7

0 Comments
By Fons Sonnemans, 1-12-2010

My Countdown application for the Windows Phone 7 is now available in de Windows Phone Marketplace.

Countdown is a metro-styled application that is used to track various dates, events and displays the time remaining until the timer comes to an end. See how long until Christmas, New Year, Easter, Halloween, Thanksgiving, etc. Remember Birthdays, anniversaries, or any other important events.

I used my Countdown for Silverlight 4 control to create this app and added an Digital clock style.

I'm planning to add more features like Live Tiles and extra clock types soon. I hope you like it. You can download it using the following button.

Below the Countdown application in the (Zune) marketplace:

Accent Colors for Styled TextBlocks in WP7 Selected ListBoxItems

0 Comments
By Fons Sonnemans, 12-11-2010


The Problem
The Windows Phone tools in Visual Studio an Expression Blend let you create a 'Windows Phone Data Bound Application" (Template). This application uses SampleData and two List/Detail pages. The List (MainPage) contains a listbox which is templated. The ItemSource of this listbox is databound to the Items in the SampleData. When run the application and select an Item in the ListBox the DetailsPage is shown using navigation. This navigation is initiated from the SelectionChanged event of the listbox in the MainPage. When you remove this event from the XAML you would expect that the selected item in the listbox would be shown using the Accent color of your phone. But this doesn't happen. It took me a while to figure out the reason why, and how to solve it.

<ListBox x:Name="MainListBox"
            Margin="0,0,-12,0"
            ItemsSource="{Binding Items}">
    <ListBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Margin="0,0,0,17"
                        Width="432">
                <TextBlock Text="{Binding LineOne}"
                            TextWrapping="Wrap"
                            Style="{StaticResource PhoneTextExtraLargeStyle}" />
                <TextBlock Text="{Binding LineTwo}"
                            TextWrapping="Wrap"
                            Margin="12,-6,12,0"
                            Style="{StaticResource PhoneTextSubtleStyle}" />
            </StackPanel>
        </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox>

The Reason
The Selected (Visual)State of a ListBoxItem sets the foreground of the ContainerControl to the PhoneAccentBrush resource. The Two TextBlockes in the ItemTemplete of my listbox have a Style Property. Both styles are base on the PhoneTextBlockBase which has a Foreground property set to the PhoneForegroundBrush resource. This conflicts with the foreground set in the VisualState and therefore the color never changes.

<VisualStateGroup x:Name="SelectionStates">
    <VisualState x:Name="Unselected" />
    <VisualState x:Name="Selected">
        <Storyboard>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground"
                                            Storyboard.TargetName="ContentContainer">
                <DiscreteObjectKeyFrame KeyTime="0"
                                        Value="{StaticResource PhoneAccentBrush}" />
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
    </VisualState>
</VisualStateGroup>

The Solution
The solution is very easy: remove the Foreground from the Style of the Textblock. I did this using Blend. I opened the ItemTemplate of the ListBox. Selected the first TextBlocked and created a copy of the style (menu Object, Edit Style, Edit a Copy...), naming it 'PhoneTextExtraLargeStyleWithoutForeground'. This style is based on the 'PhoneTextBlockBaseWithoutForeground' style which holds the Foreground property. I used Blend to create a copy of this style (menu Object, Edit Additional Styles, Edit BasedOn, Edit a Copy...), naming it 'PhoneTextBlockBaseWithoudForeground'. Then I removed the Foreground property from this style.

I also created a copy from the PhoneTextSubtleStyle and named it PhoneTextSubtleStyleWithoutForeground. This style sets the Foreground property to PhoneSubtleBrush resource. I removed this property and added an Opacity property which I set to 0.8

<Style x:Key="PhoneTextBlockBaseWithoudForeground"
        TargetType="TextBlock">
    <Setter Property="FontFamily"
            Value="{StaticResource PhoneFontFamilyNormal}" />
    <Setter Property="FontSize"
            Value="{StaticResource PhoneFontSizeNormal}" />
    <!--<Setter Property="Foreground"
 Value="{StaticResource PhoneForegroundBrush}" />-->
    <Setter Property="Margin"
            Value="{StaticResource PhoneHorizontalMargin}" />
</Style>

<Style x:Key="PhoneTextExtraLargeStyleWithoutForeground"
        BasedOn="{StaticResource PhoneTextBlockBaseWithoudForeground}"
        TargetType="TextBlock">
    <Setter Property="FontFamily"
            Value="{StaticResource PhoneFontFamilySemiLight}" />
    <Setter Property="FontSize"
            Value="{StaticResource PhoneFontSizeExtraLarge}" />
</Style>
<Style x:Key="PhoneTextSubtleStyleWithoutForeground"
        BasedOn="{StaticResource PhoneTextBlockBaseWithoudForeground}"
        TargetType="TextBlock">
    <Setter Property="Opacity"
            Value="0.8" />
    <!--<Setter Property="Foreground" Value="{StaticResource PhoneSubtleBrush}"/>-->
</Style>

The Styles of the two TextBlocks are now set to PhoneTextExtraLargeStyleWithoutForeground and PhoneTextSubtleStyleWithoutForeground.

<ListBox x:Name="MainListBox"
            Margin="0,0,-12,0"
            ItemsSource="{Binding Items}">
    <ListBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Margin="0,0,0,17"
                        Width="432">
                <TextBlock Text="{Binding LineOne}"
                            TextWrapping="Wrap"
              Style="{StaticResource PhoneTextExtraLargeStyleWithoutForeground}" />
                <TextBlock Text="{Binding LineTwo}"
                            TextWrapping="Wrap"
                            Margin="12,-6,12,0"
              Style="{StaticResource PhoneTextSubtleStyleWithoutForeground}" />
            </StackPanel>
        </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox>

If you run the application the selected item in the listbox is shown using the accent color. Problem fixed.

Result

Cheers,

Fons

All postings/content on this blog are provided "AS IS" with no warranties, and confer no rights. All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or sponsors. The content on this site is licensed under a Creative Commons Attribution By license.