Generate multiple PNG images with Inkscape SVG for Windows 10 Universal UWP apps with Powershell

I’ve been using Inkscape for many of my projects, it’s a great open source SVG vector editor. Windows Universal apps support scaling to pixel density for multiple resolutions. I made this Powershell script to generate PNGs scaled to multiple resolutions from your vector SVG files, so your app can look pretty at all resolutions. Using it is very easy:

  1. Make sure Inkscape is in the PATH
  2. In Inkscape create separate SquareLogo.svg and WideLogo.svg files, and size each document to fit the logo.
  3. Run the script, and it’ll produce about 30+ rescaled images that you can use in Visual Studio manifest editor.
# create a set of tiles for Universal Windows apps
# with Inkscape
# 1. Add Inkscape folder to PATH
# 2. place SquareLogo.svg, WideLogo.svg, Splash.svg into $dir
# images will appear in $outDir
$dir = "C:\svg"
$outDir = "C:\svg\images"

$squareSizes = @(71,89,150,107,142,284,600,300,150,225,188,1240,620,310,465,388,176,88,44,66,55,256,48,24,16,200,100,75,63,50)
$wideSizes = @(1240,620,310,465,388)
$splashSizes = @(2480,1240,930,775,620)

# square images
foreach($size in $squareSizes){
    $res = $outDir+"\"+"SquareLogo-"+$size+".png"
    inkscape --export-png $res -w $size $dir"\SquareLogo.svg"
}

# wide images
foreach($size in $wideSizes){
    $res = $outDir+"\"+"WideLogo-"+$size+".png"
    inkscape --export-png $res -w $size $dir"\WideLogo.svg"
}

# splash
foreach($size in $splashSizes){
    $res = $outDir+"\"+"Splash-"+$size+".png"
    inkscape --export-png $res -w $size $dir"\Splash.svg"
}

Flipping Card animation for Windows Phone 7 using Expression Blend

Download Source

In this post I’ll show you how to create a card flipping animation for Windows Phone 7, using Expression Blend. The source code is available for download in the attachment. First, I create a Windows Phone 7 project from scratch, using Expression Blend, you can also create a project in Visual Studio, right click on any page and select “Open with Expression Blend…” context menu option. I actually used this technique in real Windows Phone games I built:

ApplicationIconUno
DUO
*****
ApplicationIconCrazyEights
Crazy
Eights
ApplicationIcon101
101 Card
Game
ApplicationIconMauMau
Mau
Mau
ApplicationIconSwitch
Switch
*****

Continue reading “Flipping Card animation for Windows Phone 7 using Expression Blend”

Windows Phone 7.5 Mango Cheat Sheet – Live Tiles

One of the most important (and unique!) features of Windows Phone 7.5 is live tiles. Live tiles make Windows Phone truly recognizable, even if you see it from 10 meters away in a store. I created this cheat sheet to help you quickly add live tile features to your app. Enjoy!

I also recommend checking out another quick card for Windows Phone controls and toolkits:

Windows Phone 7.5 Cheat Sheet – Controls and Toolkits

Continue reading “Windows Phone 7.5 Mango Cheat Sheet – Live Tiles”

A vector set “I Love Windows Phone” and Metro in SVG

i-love-wp-allI feel like giving out something to the community today. And there’s one thing I’ve been missing: a set of vector graphics for Metro UI, and in particular, “I love Windows Phone” piece. Several people asked me about it, so I created one in SVG, using my favorite vector tool: Inkscape.

License: This vector set is released under the free creative commons license (CC), feel free to use in works. I hope it will inspire you to build more amazing Windows Phone apps.

DOWNLOAD ZIP WITH VECTOR GRAPHICS (SVG)

Continue reading “A vector set “I Love Windows Phone” and Metro in SVG”

MVVM is your friend to get sensor data in Windows Phone 7

sensor-dataThere’s little doubt that MVVM pattern makes your life as a developer a lot easier. There’re several MVVM frameworks for Windows Phone that make it happen:

and a few others (please, comment if you don’t find your favorite one!).

In my everyday life I use MVVM Light a lot, but today I’d like to explore new trends in the latest editions of some MVVM frameworks. I’m talking about using MVVM to support sensor data and services: accelerometer, camera, compass, gyro, location and others.

Focus on Catel primarily, because it brings a lot of support for MVVM from the sensors prospective, and also because I overlooked it somehow in the past.

Geert van Horrik, the author of Catel did a fantastic work building and documenting the framework on Code Project and in this documentation on his Web site.  Specifically, I couldn’t stop from quoting this impressive side-by-side comparison sheet:

Continue reading “MVVM is your friend to get sensor data in Windows Phone 7”

Rapidly Develop Windows Phone Apps with PowerPoint

wp-powerpoint

Part I. I’ll show you how to quickly create Windows Phone apps with PowerPoint. Turns out, for Windows Phone prototyping you don’t need to be an expert or even a programmer. If you are a programmer, it’ll certainly help you to be super-productive! Prototyping is a great way for visualizing ideas, and putting a quick demo together, that can later be converted into a real application. From Walt Disney to George Lucas, prototyping is used in many great products and industries and having it for mobile phone development certainly helps a lot.

SketchFlow provides a great deal of documentation on the concepts of prototyping, in this post I’m trying to make a concise step-by-step guide to prototyping apps.

Continue reading “Rapidly Develop Windows Phone Apps with PowerPoint”

Connect Windows Phone 7 Apps to WordPress using JSON

json

Download Code Samples

This is the Part 2 of connectivity posts for Windows Phone. In Part 1 we discussed how to connect a Windows Phone app to WordPress using the blog’s built-in XMLRPC mechanism. This time we’ll use another popular protocol called JSON.

Many of us use WordPress: it’s an excellent platform for bloggers. Every time I start a new Web project, before deciding to build it from scratch, I try to consider WordPress or other CMS to save time and effort. WordPress plugins fills many gaps, including eCommerce, Membership, CMS and hundreds of other use cases. If you are used to building everything from scratch, you probably smell danger in this lego mentality. Well, it makes sense, considering that 60% of software projects fail on time and on the budget. The paradigm of “standing on the shoulders of the giants” suddenly makes sense in the risky business of building software!

As a Windows Phone app developer you probably wonder how can you connect your Windows Phone 7 app to your WordPress blog? WordPress’ standard built-in mechanism is XMLRPC, but with a help of a free plugin called JSON API, WordPress can be accessed with JSON.

The only file we change in this example from the standard template Visual Studio has for a Panorama project is MainViewModel.cs. Cool, isn’t it?

Continue reading “Connect Windows Phone 7 Apps to WordPress using JSON”

Connect Windows Phone 7 Apps to WordPress using XMLRPC

post-xmlrpc

Download Code Samples

This is Part 1 of my Windows Phone connectivity series. Check out Part 2 on how to connect to WordPress using JSON.

Many of us use WordPress: it’s an excellent platform for bloggers. Every time I start a new Web project, before deciding to build it from scratch, I try to consider WordPress or other CMS to save time and effort. WordPress plugins fills many gaps, including eCommerce, Membership, CMS and hundreds of other use cases. If you are used to building everything from scratch, you probably smell danger in this lego mentality. Well, it makes sense, considering that 60% of software projects fail on time and on the budget. The paradigm of “standing on the shoulders of the giants” suddenly makes sense in the risky business of building software!

As a Windows Phone app developer you probably wonder how can you connect your Windows Phone 7 app to your WordPress blog? WordPress’ standard built-in mechanism is XMLRPC. If you care to read my next post I’ll show you how you can use another popular mechanism: JSON to communicate with your favorite blog engine.

Continue reading “Connect Windows Phone 7 Apps to WordPress using XMLRPC”