February

Slide Show Photo Gallery

Author: Steve
Posted on: 25 Feb 2010
In this article I want to show how to create simple photo gallery with the help of Cellbi SlideShow control from SvFx library.

Download: Source

Try: SvFx

See: Online Demo

See it in action below:

SlideShow control is designed to simplify slide show creation. Cellbi SlideShow control is very powerful. It can be configured by using slide show patterns. In this article we will focus on the CompositeSlideShowPattern and ArrayAnimationPattern. It can be used to define complex animations and specify animation for each item individually.

Lets take a look how CompositeSlideShowPattern can be used to create a simple photo gallery.

Here is XAML code

 <SlideShow 
x:Name="uxSlideShow" >
<SlideShow.Pattern >
<CompositeSlideShowPattern >
<CompositeSlideShowPattern.AnimationPattern >
<ArrayAnimationPattern
ItemMargin="10"
GroupShowInterval="0.7"
GroupHideInterval="0.7" >
<ArrayAnimationPattern.AnimationSelectors >
<AllAnimationGroupSelector >
<AllAnimationGroupSelector.AnimationPattern >
<ShiftItemPattern
ShowInterval="0.05"
ShowSpeed="5"
ShowMoveTween="BackTweenOut"
ShowShiftMode="FromStart"
HideInterval="0.05"
HideSpeed="5"
HideMoveTween="BackTweenIn"
HideScaleTween="BackTweenIn"
HideShiftMode="FromStart" />
</AllAnimationGroupSelector.AnimationPattern>
</AllAnimationGroupSelector>
</ArrayAnimationPattern.AnimationSelectors>
</ArrayAnimationPattern>
</CompositeSlideShowPattern.AnimationPattern>
</CompositeSlideShowPattern>
</SlideShow.Pattern>
<Canvas >
<Image
Source="166002_small.jpg" />
<Image
Source="166005_small.jpg" />
<Image
Source="166007_small.jpg" />
</Canvas>
</SlideShow>

SlideShow has "Pattern" property which can be used to extend its functionality. In the example above CompositeSlideShowPattern is used, it interprets items as animated parts.

CompositeSlideShowPattern has "AnimationPattern" property, which specifies locations and animation rules for item parts. In the example above we used ArrayAnimationPattern. It can arrange all items in a grid or in a vector. The number of columns can be set via "ColumnCount" property

The most interesting thing here is that you can specify animations for each sub item in the set individually. This can be done with the help of selectors. Selector represents a function which selects a group of sub items from the whole set and defines animation for this group. Selector can select single item, all items, even or odd items or any other items. It completely depends on the function of selector. Selectors can be combined to create complex animations.

In the example above AllAnimationGroupSelector is used. It is included in the SvFx library. It selects all sub items from SlideShow item (in this case Canvas is used), and applies the same animation pattern to each sub item in the set. AnimationPattern property is used to specify animation for each item in the group. You can get more clear sense of how it works in our Demo.

 

Best Regards,
Cellbi Software

Posted in: SvFx

New Pattern for the SlideShow

Author: Steve
Posted on: 09 Feb 2010
In this post I want to show you some new SlideShow pattern we are working on.

Download: Source

Try: SvFx

See: Online Demo

See it in action below:

These patterns will be available in future release. We focused on using Projection feature available in Silverlight 3 to add some cool transition effects for the SlideShow control.

New pattern is called Rotation3DSlideShowPattern. It has two properties ShowRotation and HideRotation. These properties are of ElementRotation type and are used to create show and hide transitions.

ElementRotation has Center, Offset and Rotation properties, which can be used to define 3D rotation effect.

I think it's better to examine how it can be used inside XAML code:

 <slideshow:Rotation3DSlideShowPattern 
x:Name="SimpleRotation"
SpeedRatio="2"
TweenType="None"
SlideMode="Sequence"
SlideDelay="0.2" >
<slideshow:Rotation3DSlideShowPattern.ShowRotation >
<effects:ElementRotation >
<effects:ElementRotation.Center >
<common:Point3D
X="0.5"
Y="0.5"
Z="0.5" />
</effects:ElementRotation.Center>
<effects:ElementRotation.Offset >
<common:Point3D
X="0"
Y="0"
Z="0" />
</effects:ElementRotation.Offset>
<effects:ElementRotation.Rotation >
<common:Point3D
X="0"
Y="90"
Z="0" />
</effects:ElementRotation.Rotation>
</effects:ElementRotation>
</slideshow:Rotation3DSlideShowPattern.ShowRotation>
<slideshow:Rotation3DSlideShowPattern.HideRotation >
<effects:ElementRotation >
<effects:ElementRotation.Center >
<common:Point3D
X="0.5"
Y="0.5"
Z="0.5" />
</effects:ElementRotation.Center>
<effects:ElementRotation.Offset >
<common:Point3D
X="0"
Y="0"
Z="0" />
</effects:ElementRotation.Offset>
<effects:ElementRotation.Rotation >
<common:Point3D
X="0"
Y="-90"
Z="0" />
</effects:ElementRotation.Rotation>
</effects:ElementRotation>
</slideshow:Rotation3DSlideShowPattern.HideRotation>
</slideshow:Rotation3DSlideShowPattern>

That's how Rotation3DSlideShowPattern can be used inside XAML code. I think that the code shown above is really simple compared to the actual transition effect we get.

What do you think? Is there any way we can simplify the code above? Please let me know!

Posted in: SvFx

SlideShow and Wipe Patterns

Author: Steve
Posted on: 01 Feb 2010
SlideShow control usage example with full source code.

Download: Source

I think that it'll be correct to say that almost each web site has to represent content separated by pages providing easy navigation between these pages. Navigation between parts of content can be used in photo and video galleries as well.

This is exactly what SlideShow control does. You add photos, videos or any other content as items of the SlideShow and you're done ;)

In this article we'll use only one animation pattern. In future posts I'll show you how other patterns can be used :)

See it in action below:

I hope that this simple post with just several lines of XAML code will give you a good taste of what Cellbi SlideShow control can do. Let's get started.

Cellbi SlideShow gives you an ability to organize content of your site, build photo and video galleries with hundrends of advanced transition effects. You can use builtin slide show animation patterns, or you can change several propereties to completelly change slide show animations in 1-2 steps.

The code to declare SlideShow with several images placed inside will look as follows:

 <SlideShowControl 
Width="400"
Height="250" >
<Image
Source="Image001.jpg"
Width="380" />
<Image
Source="Image002.jpg"
Width="380" />
<Image
Source="Image003.jpg"
Width="380" />
<Image
Source="Image004.jpg"
Width="380" />
</SlideShowControl>

That's how SlideShow is declared in XAML code. We've added only 5 lines of code, and it will give us animated transitions between images if we'll call SlideShow.ShowNext, SlideShow.ShowPrevious or SlideShow.ShowByIndex method in C# of VB code.

To be honest such simple example will use only Fade-In and Fade-Out transition effects to show and hide images. To get more complex effects we will use special animation patterns.

Cellbi SlideShow contains several powerfull builtin animation patterns. More over you can create your own animation patterns. Lets take a look how WipeSlideShowAnimarion works.

 <SlideShowControl 
Width="400"
Height="250" >
<SlideShowControl.Pattern >
<WipeSlideShowPattern >
<WipeSlideShowPattern.Pattern >
<BlindsHorizontalDownWipePattern
RowCount="10"
WipeTweenType="BackTweenOut" />
</WipeSlideShowPattern.Pattern>
</WipeSlideShowPattern>
</SlideShowControl.Pattern>
<Image
Source="Image001.jpg"
Width="380" />
<Image
Source="Image002.jpg"
Width="380" />
<Image
Source="Image003.jpg"
Width="380" />
<Image
Source="Image004.jpg"
Width="380" />
</SlideShowControl>

Here we use WipeSlideShowPattern as animation pattern for the SlideShow. Then type of wipe animation is set using Pattern property. We use BlindsHorizontalDownWipePattern and assign its properties. Please try to play with different wipe patterns and try to set different properties. You'll find that it is very easy to change transition effects.

Download FREE trial version now.

Play with online Demo application.

Posted in: SvFx