Effects and Transitions for Silverlight

Another installment of Silverlight.FX additions to enable creating declarative views - this time, pre-packaged, declarative effects and transitions...

My recent Silverlight-related blog posts have shared a common theme: creating declarative views - whether it is declaratively attaching behaviors such as auto-complete, or declaratively hooking up views to their associated view models, or declaratively authoring themes and loading them. This post is the next installment in that overall series - declarative effects and transitions.

XAML and Silverlight provide some building blocks like storyboards and now visual state manager that enable some powerful mechanisms for adding visual pizzaz to your application's user interface. However, I sometimes find they are too general and low-level a solution, requiring one to go into custom template mode all too often, whether it is to define storyboards, or new states and transitions - more often than not, I just want a simple pre-packaged effect that I can attach to an element and associate with some user interaction. Furthermore, the current lack of event triggers requires code to be added to views to begin and stop those storyboards or switch from one visual state to another. Think powerpoint - the prepackaged animation effects with some basic triggers go a long way.

That sort of problem space, and approach inspired me to see what can be done in Silverlight today, resulting in the addition of a Glitz namespace in my Silverlight.FX work. (The name is no coincidence. For those that remember our Ajax framework's early days, back when it was called Atlas, I had written a Glitz script animation framework there, and then wrote one for Script# - this Silverlight work started its life when I recompiled my Script# code as actual managed code rather than into JavaScript!)

Weather App Screen-shots

On the top is a set of screen-shots of a simple application that consumes some of these effects. You have to click it to run it live to actually see the effects! The application basically fetches the current weather and the forecast for the supplied zip code (and yes, it seems summer has decided to take a break here in the northwest). All the core logic is implemented in a view model that is decoupled from the view, and is easily tested. It is responsible for talking to the data layer, which is responsible for invoking a web service and unpacking the JSON data returned from the service. The view is completely declarative and is about 130 lines of XAML. It uses behaviors (for things like filtering zip code input to numbers), actions to hook into the view model, and of course effects and transitions for some subtle bits of glitz.

I'll share a couple of snippets of the XAML, just to get the general programming model across.

First is the Load button that not only instructs the view model to load weather for the supplied zip code, but also plays a transition to go from the initial screen to the next.

<fxui:Button Content="Load"
  fxui:ButtonEvents.Click="$model.LookupWeather(zipCodeTextBox.Text)">
  <fxglitz:Effects.ClickEffect>
    <fxglitz:SlideTransition Mode="Left" TargetName="layoutGrid" Duration="00:00:1.25"
      Reversible="False" Easing="ElasticInOut" />
  </fxglitz:Effects.ClickEffect>
</fxui:Button>

Second, is an effect attached to the logical mouse hover event (which implies playing the effect in forward direction on mouse enter, and playing the same effect in reverse direction in response to the mouse out event) on the vertical forecast bars in the 3rd screen above.

<Border Background="#20000000">
  <fxglitz:Effects.HoverEffect>
    <fxglitz:ColorFillEffect FillColor="#80000000" Duration="00:00:0.5" Easing="QuadraticInOut" />
  </fxglitz:Effects.HoverEffect>
  ...
</Border>

You can download the framework, and the associated samples here. Very soon I will be putting this up on my projects site for folks to track in a bit more organized way than following just the blog posts.

Glitz: Effects and Transitions
Glitz Framework Layering An effect is basically a behavior that can be attached to an element and triggered upon some event. Each effect encapsulates two animations - a forward animation and a reverse animation that it alternates between. Effects can be told to play in forward only mode, reverse only mode, or automatically reverse after completing their forward animation.

Effects are extensible. Some of the effects I have built into the framework include: Resize, Move, Spin, Fade, Highlight, ColorFill, Shake, and Pulsate. Effects are composable. CompositeEffect can play a set of child effects in parallel or in sequence.

Transitions derive from Effect, and can be attached to a panel that contain two child elements. The transition basically uses animations to hide the top element to reveal the bottom element. Like effects, transitions have forward and reverse behavior that allow them to revert back to the top element. So far the framework has four transitions built in: CrossFade, Blinds, Slide, and Flip.

Effects and transitions are both attached to UI elements as behaviors. The Effects class exposes various attached properties such as ClickEffect, HoverEffect, FocusEffect, LoadEffect, and TimedEffect. As the names suggest effects and transitions can be hooked up to mouse clicks, mouse hovers, keyboard focus, load events and timer tick events.

Effects and transitions build on a procedural animation framework that makes it very simple to write new and interesting behaviors and computed animations. The animation framework itself can be used independently of the effects layer. It provides the ability to implement unbounded (by time) animations, as well as duration-bound animations. The duration bound animations can easily tap into a set of easing functions commonly thought of as tweening options, that allow animations to accelerate on start (ease in), decelerate on end (ease out), as well as easily provide the perception of elastic rubber bands or bounce behaviors.

Effect and Transition Gallery
If you download the code, you'll see a number of effect and transition classes in the Silverlight.FX.UserInterface.Glitz namespace. Most of those can be seen in action in the screen shot below (again click to run).

For example, here is the complete XAML for the Highlight effect:

<Grid>
  <Grid.RowDefinitions>...</Grid.RowDefinitions>
  <fxglitz:Effects.ClickEffect>
    <fxglitz:HighlightEffect TargetName="highlightImage" HighlightColor="Yellow" Duration="00:00:01" />
  </fxglitz:Effects.ClickEffect>
  <Border x:Name="highlightImage">
    <Image Source="/Silverlight.png" />
  </Border>
  <TextBlock Grid.Row="1">Highlight</TextBlock>
</Grid>

For a transition example, here is the complete XAML for the Flip effect:

<Grid>
  <Grid.RowDefinitions>...</Grid.RowDefinitions>
  <fxglitz:Effects.ClickEffect>
    <fxglitz:FlipTransition TargetName="flipContainer" Duration="00:00:1" Easing="QuadraticInOut" />
  </fxglitz:Effects.ClickEffect>
  <Grid x:Name="flipContainer">
    <Image Source="/MS.net.png" />
    <Image Source="/Silverlight.png" />
  </Grid>
  <TextBlock Style="{StaticResource staticText}" Grid.Row="1">Flip</TextBlock>
</Grid>

What other interesting effects and transitions would you love to see? Or better yet, try building one and using the underlying procedural animation framework, and share the experience.

Adding Effects and Transitions to Controls?
One thing I haven't shown in the samples, but I've just begun prototyping is higher-level controls that have a property of type Effect. To share one scenario, imagine a List control that has ShowEffect and HideEffect properties - it plays the effect assigned to ShowEffect on any item that is added to the list, and plays the effect assigned to HideEffect on any item that is removed from the list. This will allow creating a web 2.0 style list user interface (ala JQuery/scriptaculous) completely declaratively using pre-packaged animation effects.


[ Tags: | | ]
Posted on Tuesday, 7/29/2008 @ 8:49 PM | #Silverlight


Comments

29 comments have been posted.

Valentin

Posted on 7/29/2008 @ 11:04 PM
Great samples!

Is this working in Blend? Can we customize the animation effects there?

Nikhil Kothari

Posted on 7/29/2008 @ 11:23 PM
I'd love to see tooling around this develop in Blend - part of doing this work is to have something a bit more concrete to initiate the discussion with the right folks. Like I said in the post, again imagine powerpoint...

The point is the customization model for these is different than say the customization model for something like storyboards. Intentionally, the customization model is property based - for example, one doesn't need to know that creating a flip transition involves creating two scale transform animations (with the right to/from/by values), and two opacity animations. Instead you just specify the panels to animate, and any other properties the effect uses to the underlying animations.

ilog

Posted on 7/30/2008 @ 3:44 AM
The links don't work for me as well, sorry...

Nikhil Kothari

Posted on 7/30/2008 @ 8:37 AM
Do you mean you can't get to the pages, or that the apps on those pages don't work? The pages and the apps work fine for me... do you have the latest version of Silverlight 2 installed?

Fallon Massey

Posted on 7/31/2008 @ 1:57 AM
The links work for me.

BTW, the code is AWESOME Nikhil, another homerun!

David Roh

Posted on 7/31/2008 @ 3:31 AM
Hi Nikhil,

The work that you have done on Silverlight.FX is awesome - thank you very much for all your hard work and for sharing!

You work has helped a great deal in architecting my Silverlight applications.

David Roh

shaheel

Posted on 7/31/2008 @ 3:34 AM
Dear Mr.Nikhil,

I need your suggestion in choosing my job profile further. Currently i work as web designer with 2+ years of experience. I am in the process of learning xhtml, css and keen to explore the technical part of designing.

I feel i could learn php also, as i have worked with php team in solving some design issues while developing web applications.

1 ) Now in this point which one would be more better learning php in full swing or going for silverlight and Microsoft Expression Blend..What is the pre requisite for learning silverlight as i dont have experience in programming.

And please note that if I select silverlight i have to explore myself and self learn that may take time, provided i dont know abcd in dot net. Whereas in case of php there are seniors to help me out.

2 ) And does RIA (Rich Internet Application ) includes a combination of php too ? or excluding php ?

please suggest the best selection...

MADHAVI

Posted on 8/1/2008 @ 1:46 PM
Hi Nikhil,
I read your blog. your application will going to very helpful to people like me who have less knowldege of software .thanks. lot

Chris Rothery

Posted on 8/7/2008 @ 4:21 AM
Hi Nikhil,

Another great post has me salivating and daydreaming about all of the interface candy I need to put into my silverlight app :)

One thing I've noticed from my first extremely quick play with the effects library is what happens when an effect is reversed. I picked on the rotate effect, attaching it to the hover event but it's also visible in the effects sample if you click twice in succession quite quickly.

If the image hasn't finished it's first rotation animation and you click again, it rotates back but starts at an angle of zero again, rather than whereever it had got to in the animation which is a bit jarring.

Any ideas? I've looked in SpinEffect.cs and it looks like it should be using the RotateTransform's AngleProperty as it's starting point so it would seem that it shouldn't be doing this.

I'll debug it some more and if I find anything else I'll send it through.

Thanks for the great library

Chris

Kevin Kuebler

Posted on 8/7/2008 @ 1:18 PM
Hi Nikhil,

This is great stuff - thanks for making this available. I've begun to use the Glitz effects within a page of a Silverlight app I'm working on and it's really nice. What I'm wondering, and what I haven't been able to figure out from the source code, is if it's possible use to this to animate between entire pages within an app (for example apply a SlideTransition between Page1.xaml and Page2.xaml). I realize that "Pages" are really just UserControls so I'm thinking it's possible but haven't figured out the best way to do it yet. Ideally it could be done in a way such that only the currently visible page needs to be loaded to avoid using too much memory on the client. Maybe some way to call the transition from code and have the new page instantiated just before applying the transition? Or is that not possible given how the framework works?

Thanks,
Kevin

mike kidder

Posted on 8/8/2008 @ 5:24 PM
Curious? I noticed that in your AmazonSearch project, both C# files for the SearchView show a relationship to the XAML file in VS Solution Explorer treeview.

However, can't get same relationship to work for the Weather widget. What is the difference??

Fallon Massey

Posted on 8/13/2008 @ 6:13 PM
Nikhil, I notice that a few of the effects, like flip, slide, and others, operate on two images.

I was wondering if there was a way to have them operate on a series of images, to traverse a virtual list, so to speak.

I did manage to simulate this by removing the images in the grid, and creating two new images, which promptly were able to work with the effect, but this seemed rather sloppy, even though I could make it work.

I probably should have, but didn't look at your transition code, but here's my question. How hard would it be to modify your code to operate over more than two images, and is this in any plan you have for this library?

Thanks.

Bill Anderson

Posted on 8/16/2008 @ 7:26 AM
Hi,

I ended up doing this programactically by creating an ApplyTransition method in a GenericEffects class that i created. This method took an elementToTransition as a param. I then added that element to the "flipContainer"'s children collection at index 0 and removed all other elements until there were only 2 in the container. After that, I fired off my event that the effect.Trigger was wired up to. To get this to work, I did have to expose Effect.Trigger as public (it was internal) in the original source. Here is an example of my source: PageSwitcher.xaml/.cs, TransitionContainer.cs, and GenericEffects.cs

<UserControl x:Class="SilverLightTest.PageSwitcher"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:app="clr-namespace:SilverLightTest;assembly=SilverLightTest"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:fxglitz="clr-namespace:Silverlight.FX.UserInterface.Glitz;assembly=Silverlight.FX"
Height="200" Width="215">

<app:TransitionContainer x:Name="transitionContainer" TargetName="MainContent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200*" />
</Grid.ColumnDefinitions>
<Grid x:Name="MainContent" Grid.Row="0" Grid.Column="0" Background="White">
<app:StartPage></app:StartPage>
</Grid>
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0">
<Button Click="btnScreen1_Click" x:Name="btnScreen1" Content="Screen 1"></Button>
<Button Click="btnScreen2_Click" x:Name="btnScreen2" Content="Screen 2"></Button>
<Button Click="btnScreen3_Click" x:Name="btnScreen3" Content="Screen 3"></Button>
<Button Click="btnScreen4_Click" x:Name="btnScreen4" Content="Screen 4"></Button>
</StackPanel>
</Grid>
</app:TransitionContainer>
</UserControl>

public partial class PageSwitcher : UserControl
{
public PageSwitcher()
{
InitializeComponent();
}

private void btnScreen1_Click(object sender, RoutedEventArgs e)
{
FlipTransition t = new FlipTransition() { Duration = new TimeSpan(0, 0, 0, 0, 800), Easing = EffectEasing.BackInOut };
GenericEffects.ApplyTransition(this.transitionContainer, new Screen1(), t);
}

private void btnScreen2_Click(object sender, RoutedEventArgs e)
{
SlideTransition t = new SlideTransition() { Duration = new TimeSpan(0, 0, 0, 0, 800), Easing = EffectEasing.BackInOut };
GenericEffects.ApplyTransition(this.transitionContainer, new Screen2(), t);
}

private void btnScreen3_Click(object sender, RoutedEventArgs e)
{
SlideTransition t = new SlideTransition() { Duration = new TimeSpan(0, 0, 0, 0, 800), Easing = EffectEasing.BackInOut };
GenericEffects.ApplyTransition(this.transitionContainer, new Screen3(), t);
}

private void btnScreen4_Click(object sender, RoutedEventArgs e)
{
SlideTransition t = new SlideTransition() { Duration = new TimeSpan(0, 0, 0, 0, 800), Easing = EffectEasing.BackInOut };
GenericEffects.ApplyTransition(this.transitionContainer, new Screen4(), t);
}
}

public class TransitionContainer : Grid
{

public static DependencyProperty TargetNameProperty = DependencyProperty.Register("TargetName",
typeof(string), typeof(TransitionContainer), new PropertyMetadata(null));

public string TargetName
{
get
{
return (string)GetValue(TargetNameProperty);
}
set
{
SetValue(TargetNameProperty, value);
}
}

public Panel Target
{
get
{
return (Panel)this.FindName(this.TargetName);
}
}

}

And my GenericEffects class
public static class GenericEffects
{
/// <summary>
/// Represents the DoTransitionEffect attached property.
/// </summary>
public static readonly DependencyProperty GenericTransitionProperty =
DependencyProperty.RegisterAttached("GenericTransition", typeof(Transition), typeof(GenericEffects),
new PropertyMetadata(OnGenericTransitionChanged));

public static event EventHandler DoTransition;

private static void OnDoTransition(object sender, EventArgs e)
{
if (DoTransition != null)
{
DoTransition(sender, e);
}
}

private static bool transitionActive;

public static void ApplyTransition(TransitionContainer transitionContainer,
FrameworkElement elementToTransition,
Transition transition)
{
//don't fire off another transition if the previous one is still running
if (GenericEffects.transitionActive) return;

GenericEffects.transitionActive = true;
transition.Completed += new EventHandler(transition_Completed);
transitionContainer.Target.Children.Insert(0, elementToTransition);
//make sure there are only 2 elements in the target of the container
while (transitionContainer.Target.Children.Count > 2)
{
transitionContainer.Target.Children.RemoveAt(2);
}

transition.TargetName = transitionContainer.TargetName;

GenericEffects.SetGenericEffect(transitionContainer, transition);
GenericEffects.DoTransition(transitionContainer, EventArgs.Empty);
}

static void transition_Completed(object sender, EventArgs e)
{
GenericEffects.transitionActive = false;
(sender as Transition).Completed -= transition_Completed;
}

private static void OnGenericTransitionChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
BehaviorManager.UpdateBehavior(o, GenericTransitionProperty, (Effect)e.OldValue, (Effect)e.NewValue);
}

public static Effect GetGenericEffect(FrameworkElement element)
{
return (Effect)BehaviorManager.GetBehavior<Effect>(element, GenericTransitionProperty);
}

public static void SetGenericEffect(FrameworkElement element, Effect effect)
{
effect.Trigger = new GenericEffectTrigger(effect); //had to update src to i could set the trigger to my own trigger. Maybe a better way? :)
BehaviorManager.SetBehavior(element, GenericTransitionProperty, effect);
}

private sealed class GenericEffectTrigger : EffectTrigger
{
private bool _forward;

public GenericEffectTrigger(Effect effect)
: base(effect)
{
}

public override void Attach()
{
GenericEffects.DoTransition += OnDoTransition;
}

public override void Detach()
{
GenericEffects.DoTransition -= OnDoTransition;
}

private void OnDoTransition(object sender, EventArgs e)
{
_forward = !_forward;
TriggerEffect(_forward ? EffectDirection.Forward : EffectDirection.Reverse);
}
}
}

Nikhil Kothari

Posted on 8/20/2008 @ 7:51 AM
@Chris Rothery: Most of the effects should start from the current value - SpinEffect should, as you say. I wasn't able to repro the exact problem you're referring to, but I've seen it in the past. Perhaps need to change the duration to see it more explicitly...

@Kevin Kuebler: I am working on some prototype controls that should exactly demonstrate the transition between page1 and page2 scenario. The 2nd control is created just before the transition and the 1st control is removed from the tree after the transition is completed. Stay tuned for the next installment :-)

@Fallon Massey: The transition stuff works on two controls in a panel, but some outer control can in fact add/remove controls into the panel and play transitions as it does. Same response as the one to Kevin right above...

@Bill Anderson: Interesting. One of the things I am doing as part of using effects/transitions in higher level controls is turning an effect into an animation factory... in other words you can go to an effect and ask it to create an animation instance it represents, and then play that animation without going through the effect trigger layer. That might help in your scenario as well.

Michael W Meadows

Posted on 8/20/2008 @ 12:17 PM
Hi Nikhil,

I've been having fun experimenting with your samples, but I've run into one problem. If I add a Label to any view's xaml, I get a runtime ParserError with the message "Unknown attribute TextDecorations on element TextBlock."

Any suggestions?

Nikhil Kothari

Posted on 8/20/2008 @ 9:20 PM
@Michael W Meadows: Actually the Label control is something I started but never finished implementing, so it likely doesn't work. The thing I wanted to add was the semantics of an associated input control, hence the notion of a Label beyond a simple TextBlock.

Van Ice

Posted on 8/22/2008 @ 6:44 AM
How do you setup an effect in programmatically?

I've been trying to setup a shake effect in code and I just wind up with null reference exceptions. I want to play an effect after a drag/drop operation has completed - but the AssociatedObject is always null.

Any help would be greatly appreciated.

Chinky

Posted on 9/2/2008 @ 6:53 AM
NA

KierenH

Posted on 9/10/2008 @ 4:40 PM
Really like this series, wish some of these components were shipped out-of-the-box. Brilliant!

The framework implements all effects in code, shouldn't the focus be more on improving the designer experience for creating these effects?

Future requests:
1. NavigationService
2. Full end-to-end sample, wcf service backend -> Silverlight M-V-VM demonstrate a CRUD master-detail scenario.

fiatkongen

Posted on 9/11/2008 @ 3:31 AM
Hi

Thanks for a great library. Just what I was looking for :-)

To Van Ice -Can this help you?:

FlipTransition myTransistion = new FlipTransition();
Effects.SetLoadEffect(MyGridToFlip, effectShowSetup); //My grid, containing 2 child Grids
myTransistion.Duration = new TimeSpan(0, 0, 1);
myTransistion.Easing = EffectEasing.QuadraticInOut;

myTransistion.PlayEffect(EffectDirection.Forward); //when i need the effect to play, I call the PlayEffect

Hope this helps,

GT

Posted on 9/18/2008 @ 12:25 PM
I used the following:
private const string ServiceUriFormat = "http://pipes.yahooapis.com/pipes/pipe.run?_id=b3ff9e7b3721dd54fec75ebe3532893d&zip={0}&_render=json";

When I run your application through Visual Studio 2008, I get the following after clicking on Load:

It errs on the following code:
return _request.BeginGetResponse(callback, state);

The error:


{System.Security.SecurityException: Security error.
at MS.Internal.InternalWebRequest.Send()
at System.Net.BrowserHttpWebRequest.BeginGetResponseImplementation()
at System.Net.BrowserHttpWebRequest.InternalBeginGetResponse(AsyncCallback callback, Object state)
at System.Net.AsyncHelper.BeginOnUI(BeginMethod beginMethod, AsyncCallback callback, Object state)
at System.Net.BrowserHttpWebRequest.BeginGetResponse(AsyncCallback callback, Object state)
at WeatherWidget.Data.WeatherService.BeginGetWeather(String zipCode, AsyncCallback callback, Object state)
at WeatherWidget.WidgetModel.LookupWeather(String zipCode)
at _stub_##4(Closure , CallSite , CodeContext , Object , Object , Object )
at Microsoft.Scripting.Utils.InvokeHelper`7.Invoke(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
at Microsoft.Scripting.Utils.ReflectedCaller.InvokeInstance(Object instance, Object[] args)
at Microsoft.Scripting.Actions.ActionBinder.UpdateSiteAndExecute[T](CallSite`1 site, Object[] args)
at Microsoft.Scripting.Actions.UpdateDelegates.Update4[T,T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Initialize##1(Closure , CodeContext )
at Microsoft.Scripting.ScriptCode.Run(CodeContext context, Boolean tryEvaluate)
at Microsoft.Scripting.ScriptCode.Run(Scope scope, Boolean tryEvaluate)
at Microsoft.Scripting.ScriptCode.Run(Scope scope)
at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink)
at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)
at Silverlight.FX.UserInterface.Actions.InvokeScript.InvokeAction(EventArgs e)
at Silverlight.FX.Core.Action.InvokeActionInternal(EventArgs e)
at Silverlight.FX.Core.Action.OnTriggerEventTriggered(Object sender, EventArgs e)
at Silverlight.FX.Core.ActionTrigger.RaiseEvent(Object sender, EventArgs e)
at Silverlight.FX.UserInterface.ButtonEvents.ClickActionTrigger.OnButtonClick(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandler.Invoke(Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(Object sender, MouseButtonEventArgs e)
at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)}

GT

Posted on 9/18/2008 @ 2:25 PM
Regarding the error that I posted, is it because your pipe is not published, so basically we don't have permission to run it? Did you convert your pipe to JSON?

Nikhil Kothari

Posted on 10/13/2008 @ 9:23 AM
@GT - I did publish the pipe - I wonder if it was a one-time error, as I just ran the sample last night on my updated Silverlight.FX build that I am putting together for the final version of SL2... could you try again?

@fiatkongen, @Van Ice - I will be putting out the new build of Silverlight.FX which demonstrates how to use the transitions programmatically.

@KierenH - The effects are implemented in code, because they use procedural animations. I would have loved to use storyboards, but don't get all the requirements met. That said the idea is to have these pre-canned effects which both designer and developer can easily choose from.

Prabodh

Posted on 10/14/2008 @ 2:27 AM
Dear Nikhil,

Do you have a sample code of silverlight 2.0 which effectivley uses Master pages ?

Prabodh

Nikhil Kothari

Posted on 10/16/2008 @ 1:03 AM
@Prabodh - the latest build of Silverlight.FX (see link at http://www.nikhilk.net/Silverlight-Controls-With-Effects-And-Transitions.aspx) includes a master-page like control - look for ContentLayout.

Mario

Posted on 10/16/2008 @ 11:58 PM
Using both IE 7 and FF 3 with final version of Silverlight 2 i'm not able to see your demos. The apps are downloaded but the page stays completely white...
Mario

Mario

Posted on 10/17/2008 @ 12:04 AM
Update: on this page http://www.nikhilk.net/Entry.aspx?id=205 the demos work fine for me. Please check what is different between this page demos and those : should be useful to find the issue.
Mario

Nikhil Kothari

Posted on 10/17/2008 @ 8:54 AM
The latest blog post has demos built against SL2 final, and the demos on this page and earlier pages were built against SL Beta 2 and haven't been updated. If you download Silverlight.FX from the latest blog post, you'll see all demos have been updated though.
Post your comment and continue the discussion.
 
 
 

 

 
Refresh this form if the spam-protection code is not readable, or has expired. (Your input will be preserved)