Tag Archives: Silverlight

Runtime Windows Phone App

My latest app, Runtime for WP7 is here!

RunTime is a FREE stopwatch app for Windows Phone 7.
The stopwatch continues to run in the background even if you lock the screen or leave the app.
The app allows saving laps.
The app shows both the main stopwatch timer as well as the current lap timer.

You can download the app by scanning the following QR code with Bing Vision (Press the Search button on your WP, press “Vision” then point the camera at the scree and follow the link):

Otherwise you can download it by visit the following link:

http://www.windowsphone.com/en-us/apps/e9e7b11c-242e-4d49-b4a9-c828b40f8d2d

1617e241-8731-4adc-aad0-285d534baa2c

I hope you like the app! Enjoy

Puzzler Windows Phone Game

My second WP7 app, Puzzler  is out.

Puzzler is an entertaining puzzle game with configurable levels and different game modes.

The trial offers all the functions of the game so you can experience the gameplay in all game modes and difficulty levels. It contains two puzzle image packs of seven images each.

The paid version contains five puzzle image packs, the ability to use pictures from the phone’s media library and also pictures captured with your camera. The paid version is ad free, so you have more space for your puzzle pieces and no distractions. Transform your best pictures into puzzles and start have fun arranging their pieces!

The application can be downloaded from the Zune marketplace by following this link:

Here are some screenshots:

This slideshow requires JavaScript.

Here are two videos about the game:

Presentation

Managing personal puzzles

Enjoy!

50+ FREE XAML Shapes

Here is a list of shapes I decided to offer for free download.

Both Expression Design 4 .design file and .xaml file included.

The list of shapes includes over 50 shapes:

  • Ellipse
  • Rectangle
  • ArrowRight
  • ArrowLeft
  • ArrowUp
  • ArrowDown
  • RoundedRectangle
  • Triangle
  • Pentagon
  • Hexagon
  • Heart
  • ParallelogramRight
  • ParallelogramUp
  • Trapezoid
  • Diamond
  • Cross
  • ArrowLeftRight
  • ArrowUpDown
  • ArrowQuad
  • Chevron
  • Lightning
  • CalloutRectangle
  • CalloutRoundedRectangle
  • CalloutEllipse
  • CalloutCloud
  • TriangleRight
  • Sun
  • Moon
  • TapeUp
  • TapeRight
  • Cloud
  • Star
  • Cube
  • Can
  • HalfRing
  • Bevel
  • Plaque
  • CalloutArrowRight
  • CalloutArrowLeft
  • CalloutArrowUp
  • CalloutArrowDown
  • CalloutArrowLeftRight
  • CalloutArrowUpDown
  • CalloutArrowQuad
  • FlowchartCollate
  • FlowchartDocument
  • FlowchartMultiDocument
  • FlowchartInternalStorage
  • FlowchartPredefinedProcess
  • FlowchartDelay
  • FlowchartStoredData

The archive is available here .

The new shapes can be found here.

Using GeometryPath XAML as a Path.Data template in Silverlight

In this post I’m going to discuss how to use a GeometryPath as a template for building several Path controls.

Let’s assume we have to build a Silverlight application that is able to draw Circles and Rectangles on a canvas

On a very simple level, one possible approach would be the following:

  • build basic UI on the main window (controls for selecting the shape type and a canvas)
  • handle mouse click on the canvas
  • on each mouse click build a shape according to selected shape type  and placed it on the current mouse position

One idea could be to just create Circles and Rectangles as the user clicks the canvas and with a few lines of code the resulting application looks pretty well.

The problem with this approach is that it is hard to add complex shapes.

Adding even a simple Star would be a rather complicated job: imagine having to add the 10 line segments after calculating the coordinates… it can really take a while. And if you think that a star is not too complicated, think of a more complex shape: a lightning, a cloud, etc.

I will now present you with an alternative that might save you some time.

As the main challenge is to build complex shapes, let’s pass that task to a specialized tool, namely Microsoft Expression Design 4.

Expression Design can be used to draw various shapes and it can export them in XAML format.

We’ll convert all our shapes to Paths and we will use the XAML specific Data to create our shapes.

The advantage is that once we have the Data representation, we can use this CodePlex project http://stringtopathgeometry.codeplex.com/ that can transform it into a PathGeometry.

The code might not look very clean because of the raw data of the path, but it saves us a lot of work and it makes our life easier in the future.

Basically for adding new shapes we now only need to:

  • draw the shape in Expression Design
  • export the shape and use its Data string to populate the appropriate templates dictionary entry in the ShapeFactory class

It is that simple!

Add some transformation, coloring and better UI and you have a nice drawing tool in Silverlight.

Download Source code here (VS2010 Silverlight 4 project)