2011

SvFx - Windows Phone Game Development

Author: Steve Li
Posted on: 15 Feb 2011
Game development for mobile devices is an area which apparently became as popular as game playing itself. Thanks to high-level languages and platforms such as C# and Silverlight development process is now very exciting and even developers with small experience can build thier own games which might attract thousands of people.

We are going to work on simple Windows Phone game and see how SvFx can fit in this area. It would be great if you can send us ideas and suggestions and we'll try to implement them for you.

It can be something you might use in your free time. And it can be something you will use again and again.

We are going to use SvFx library for Windows Phone in game development. This way we can see how SvFx can be helpful in this area. Plus we will polish all corners of the product. It should be also very exciting. So please post your suggestions.

Note, it should not be a complex game. It will be something that we'll create in 5-6 steps, and we're going to blog about each step of development. And of course everything here will be free. You wish - and we try to implement ;)

So, lets start. Here is the first step. Empty Windows Phone application.

First Step App

And the first question is: What would you like to see in the game?

We're waiting for your comments. It can be a simple reply in twitter: "I do not like games", "I like this idea", "I like arcade" and so on.

Posted in: SvFx

SvFx 4.1 - Advanced Transition Control for Windows Phone

Author: Steve Li
Posted on: 06 Feb 2011

We already wrote about usage of the Transition Control in Silverlight applications. In this article we'll show how to use TransitionControl inside Windows Phone applications.

Each time when you need to use something more advanced then regular ContentControl, when you need to dynamically change any content on your page like text, images or any FrameworkElements, when you need to navigate through Pages and use animations for that - you need to use TransitionControl.

The following image shows TransitionControl inside Windows Phone application.

TransitionControl inside WinPhone application

Download Source

Let's see steps required to create such application:

First, we need to add 3 assembly references from the installation folder: Cellbi.SvCommon.dll, Cellbi.SvEffects.dll and Cellbi.SvTransitionControl.dll as shown below.

SvFx assembly references

Next we add new namespace prefix for the TransitionControl.

Transition Control namespace prefix

Place TransitionControl declaration into the ContentPanel (inside MainPage.xaml).

TransitionControl declaration

Now we can select animation type from the list of built-in patterns.

TransitionControl Animation Pattern

Now we can set TransitionControl's content. We'll use images, however it is possible to use any content.

TransitionControl can manage animation of text by symbols, words and lines using ready animation patterns.

Let's add code to change content on click.

Include new images into the project.

New Images in Project

Use the first image as a default content of the TransitionControl.

Content for TransitionControl

And add some code to manage content change on click.

The code for TransitionControl slide

We are done. You can use PatternType property to change animation type. There are for about 500 animation patterns and this will not require any changes in the code behind.

It is possible to add your own animation patterns into patterns gallery or change existing animation easily. Read more on this this in the previous article.

Posted in: SvFx

SvFx for Windows Phone

Author: Steve Li
Posted on: 31 Jan 2011
SvFx for Windows Phone Beta is now available for free. Please request your free download via support@cellbi.com

SvFxWinPhoneBeta

SvFx for Windows Phone includes all SvFx controls ported to Windows Phone platform. You can use Carousel, TransitionControl, SlideShow and TextAnimation controls to build applications for Windows Phone mobile devices.
About 500 ready animation patterns included.

There are several notes about this release:

  • Currently there is no toolbox items registered inside VisualStudio.
  • It is not possible to use single "cellbi" XAML namespace prefix.
  • This release does not include samples.
  • There is no documentation included.

We would like to get your feedback.
Please help us make SvFx controls better.

Posted in: SvFx

SvFx 4.1 - Custom Effect Galleries

Author: Steve Li
Posted on: 30 Jan 2011

With SvFx 4.1 you can define your own effect galleries and use them inside SvFx controls. In this blog post I am going to show you how this can be done.

TransitionControl with custom pattern gallery:

Download Source
Try SvFx
Buy Now

I will use TransitionControl as an example, however the same code can be applied to all SvFx controls supporting Pattern property: SlideShow, TextAnimation, ChildWindow Effects etc.

First of all we need to add SvCommon, SvEffects and SvTransitionControl assembly references.

Assembly References

Now we add TransitionControl inside our Silverlight page and set PatternType property.

TransitionControl Xaml

Let's define new transition control pattern. To do this we need to create new Silverlight UserControl and change it's Xaml to be the following.

MyFirstPattern Xaml

We also need to change code behind file as shown below.

MyFirstPattern CodeBehind

It is now possible to use newly defined MyFirstTransitionPattern inside the TransitionControl.

MyFirstPattern Usage

Let's customize MyFirstTransitionPattern to create some interesting 3D rotation. Rotation3DTransitionPattern (our base class) has several properties we can set: ShowRotation, HideRotation, ShowTweenType, HideTweenType and so on. We are going to use ShowRotation and HideRotation properties to customize our pattern.

MyFirstPatternCustomization

We can add new patterns in the same way.

MySecondPatternXaml

However it would be great to have all our custom patterns defined inside separate resource collection. This is possible to do via TransitionPatternGalleryProvider class.

Create new ResourceDictinary file called MyCustomPatternsGallery.xaml and add transition patterns there.

PatternGallery

Now register MyCustomPatternsGallery resource collection inside TransitionPatternGalleryProvider. Xaml code below shows how TransitionPatternGalleryProvider can be used inside App.xaml file to register new pattern gallery for the TransitionControl.

AppXaml

Now we can use string value to set Pattern property.

UsingStringAsPattern

Posted in: SvFx

SvFx 4.1 - Advanced animations for Silverlight Navigation Frame

Author: Steve Li
Posted on: 26 Jan 2011
Starting from Silverlight 3 Microsoft has introduced the Navigation Framework which makes it possible to navigate between pages. In this post we'll see how TransitionControl can be used to add animations to the navigation frame.

Cellbi TransitionControl allows to add advanced animations for Pages using just a few lines in Xaml code.

See it in action below:

Download Source
Try SvFx
Buy Now

To add navigations between pages we can use separate project template called Silverlight Navigation Application to create new navigation application or we can add new Frame control inside existing UserControl.

In both cases we'll get Xaml code similar to the following.

Frame control in xaml file

Navigation Framework allows mapping of address with the help of UriMapper property.

That's enough for many cases. But if you want to add transition animations for each page you will have to do some additional work.

TransitionControl is designed to simplify this task. We can now extend behaviour of the Frame control. TransitionControl includes for about 500 animation patterns.

Let's see how it works.

Add Cellbi.SvCommon.dll, Cellbi.SvEffects.dll and Cellbi.SvTransitionControl.dll assembly references.

SvFx assembly references

Add new namespace prefix.

SvFx assembly references

Use TransitionControl

TransitionControl in Frame template

At this point you can choose any animation pattern from the patterns gallery using PatternType property.

Posted in: SvFx

SvFx 4.1 - Silverlight ChildWindow Effects in Action

Author: Steve Li
Posted on: 21 Jan 2011

SvFx 4.1 includes support for Silverlight ChildWindow control animation. You can easily add animations to ChildWindow controls using just a few lines of code.

See it in action below:

Download Source
Try SvFx
Buy Now

Let's see how this works.

First of all add references to Cellbi.SvCommon and Cellbi.SvEffects assemblies.

SvCommon and SvEffects References

Create new ChildWindow control and add the following XAML code (new lines are marked with green on the left margin).

ChildWindowEffect XAML

Note that Visual Studio shows Intellisense with a complete list of built-in SvFx window patterns you can choose from.

Now open code behind file and add OnApplyTemplate method override with the following code (new lines are marked with green on the left margin).

OnApplyTemplate code

We are done! Now just call Show method to display the window.

Posted in: SvFx