Prevent ugly images on Windows Phone
Published by on 10.05.2012 at 21:16

Problem

Sometimes images look nice on a regular computer screen, but when used in your Windows Phone application they become ugly. This effect is most often seen on gradients and images with smooth coloring. In gradient images you’ll start to see stripes and bands. It looks like the colors in the image don’t blend anymore. Below are the 32bit and 16bit versions of the same images. Notice the banding on the right one. 32bit16bit

Cause

This problem may be caused by a setting in your application or just by screen of the phone itself. It occurs when a 32bit image is shown on a 16bit screen. Because there are way more shades of colors available in 32bit images than in 16bit images, you’ll start to see these artifacts when the depth doesn’t match the screen.

Solution

The solution is relatively simple. Just scramble the pixels a bit to make the colors look like they blend. This process is called dithering. Maybe you’ll remember, back in the days with Windows 3.11, you often saw ‘gradients’ in images with only two colors. Starting with 1 color and along the image there appeared more and  more pixels of a different color.     Read the full post




Animated gifs in XAML/C# :)
Published by on 07.05.2012 at 21:45

Someone the other day tweeted a link to some very cool animated gifs. I love animated gifs !! I have always wanted animated gifs in Silverlight/WPF BUT for reasons unknown they never came. They would have been perfect for A … Continue reading




One Bitmap to Rule Them All – WriteableBitmapEx for WinRT Metro Style
Published by on 07.05.2012 at 18:51

A couple of weeks ago we added official WPF support to  WriteableBitmapEx. Today I'm happy to announce that WriteableBitmapEx now also officially supports Windows 8 Metro Stlye WinRT .NET XAML. With that WriteableBitmapEx is now available for 4 platforms: WPF, Silverlight, Silverlight for Windows Phone and Metro Style WinRT .NET. Although Direct2D is the best solution for fast 2D graphics with Windows 8 Metro Style, I think there are scenarios where the WriteableBitmapEx could be helpful, esp. when using C# with XAML. I also know that some devs were waiting for this to port their Windows Phone apps to Windows 8 Metro Style. WinRT Differences Unlike the Silverlight WriteableBitmap, the Metro Style WriteableBitmap doesn't provide the pixel data directly. Its IBuffer PixelBuffer property doesn't have an interface to get the color information. Fortunately there are a few C# extension methods available which provide the pixel data as byte array or stream in the BGRA pixel format. Yes, BGRA and not like all the other platforms supported by WriteableBitmapEx as ARGB. The BGRA format is mainly used by Direct2D, which might be the reason for this hidden, but important difference of the Metro Style WriteableBitmap.     Read the full post




Quick sketching using SketchBook Pro + Wacom Intuos 4
Published by on 07.05.2012 at 02:11

Its been a while since I posted anything on this blog. Thought I’ll break the calm with a quick post about my recent sketch. I generally use Autodesk SketchBook Pro (SBP) on my Mac for the intial doodling. I then develop a fairly finished sketch before importing it into Photoshop for any post-processing. Luckily SBP saves the files in PSD format, making it easy to do the Photoshop import. The following sketch was entirely done in SBP: Rain and Tears This was done in about 30 mins as a quick sketch to demonstrate the use of SBP and a Wacom tablet to a close friend. He was quite impressed and immediately ordered a bunch of items, including a Wacom Bamboo stylus for the iPad. I guess marketing wouldn’t be a bad alternate career! BTW, the sketch is called Rain and Tears. Rain and Tears - Tiles





Using FX effects in your managed metro apps
Published by on 06.05.2012 at 13:30

In the WPF and Silverlight “desktop” worlds we have the luxury of being able to use shader effects (fx) in our apps, this infrastructure is not available in the “Windows Phone” or “WinRT XAML/C#” worlds. However thanks to SharpDx and … Continue reading




Create Games for Windows 8 using Physamajig!
Published by on 03.05.2012 at 18:26

The next update of Physamajig will allow users to create their own "Mini-Games" - without writing code! This new version will be released after the June 2012 Windows 8 Release Preview. Like the current release of Physamajig, you just draw out elements on the screen to create physics objects - but in the new version, you can add Behaviors to your objects to add much more interactivity.   So what kind of games will Physamjig allow you to create without using code? This video shows a few examples:       Read the full post




Free XNA Game Programming and Windows Phone 7 Events in Arizona in May
Published by on 01.05.2012 at 22:14

Clipboard01 Interested in learning more about game programming with XNA or building applications for Windows Phone 7? Two free all-day events are coming to Phoenix in May that you can attend to learn more. These events are always a ton of fun with some talks on the different technologies, labs, and hands-on time to actually build a custom game/application. Did I mention that there will be prizes given out and free food as well? Register at the links below and I’ll look forward to seeing you there!
  • XNA Game Development with Dan Wahlin, Spike Xavier, Rico Rodriguez, Lou Prado, and Ryan Plemons, May 5th, Tempe, AZ.Register
  • Business Application Development with Joseph Guadagno, May 12th, Chandler, AZ. Register
    Read the full post




Video Demo: Overview of XAML authoring features in Blend and Visual Studio
Published by on 30.04.2012 at 17:39

Now that many of you have had the opportunity to check out Kirupa’s Visual Studio Toolbox episode on Channel 9 for visually building HTML apps using Blend you are probably wondering where is the video for XAML authoring? Look no further! I met with Robert Green last week and we walked through building out a simple Metro app starting with the Grid app project template. You can view the recording below (or download a high-quality MP4): During this video I used both the XAML Designer in VS and Blend, highlighting the similarities and differences for each product. Highlights include some tips and tricks for quickly creating the object hierarchy, laying out your scene, adding animations and transitions, and new tooling specific to Metro app controls and app design. Joanna




Using C# code inside a Metro HTML application
Published by on 27.04.2012 at 08:07

Let’s say you’re working on a HTML Metro app and you’d like to reuse some C# code instead of rewriting, the good new is that you can, here’s how: Create a blank new WinJS application and add a div inside default.html page:
<body>
    <div id="output"></div>
</body>
  Now add a new C# library to WinJS solution: image Change the output type of the library project to WinMD file image let’s add a couple of classes to C# library, we’re going to consume them from our HTML application:
public sealed class Person
{
      public Person(string name)
       {
          this.Name = name;
          this.Address = new Address() { City = "Milano", Code = 20100 };
       }

       public Address Address { get; private set; }

       public int Age { get; set; }

       public string Name { get; private set; }

       public int CalcSum(int a, int b)
       {
          return a + b;
       }
 }

public sealed class Address
{
      public string City { get; set; }

      public int Code { get; set; }
}
      Read the full post




Designing app bars for HTML Metro style apps using Blend and the WinJS AppBar control
Published by on 26.04.2012 at 20:07

When you are designing new HTML-based Metro style applications, you’ll likely want to add one or more WinJS AppBar controls to your app. In this short tutorial, we’ll cover how to use the HTML authoring tools in Blend to create, interact with, and customize WinJS AppBar controls. You’ll find more information about using app bars on the Windows Developer Center:   Read the full post

< older posts