Home > Uncategorized > A quick look at FluidMoveBehaviour

A quick look at FluidMoveBehaviour

With Expression Blend ships a couple of assemblies that are used to implement various features on top of WPF and Silverlight. One such feature is the FluidMoveBehaviour that can be used to implement fancy stuff like this. The sample contained quite a lot of stuff and in order to see clearly what was going on, I stripped away all but the core parts. This is my version. In order to compile it references must be added to System.Windows.Interactivity and Microsoft.Expression.Interactions.


<Window x:Class="FluidMoveTest.MainWindow"





       Title="MainWindow" Height="350" Width="525">



            <ColumnDefinition Width="Auto"/>

            <ColumnDefinition Width="*"/>



        <!– Master –>

        <ListView ItemsSource="{Binding MyItems}" Name="mylistBox">




                        <Image Source="{Binding Image}" Width="100">


                                <ei:FluidMoveSetTagBehavior Tag="DataContext"/>








        <!– Detail –>

        <StackPanel DataContext="{Binding SelectedItem, ElementName=mylistBox}" Grid.Column="1">

            <Image Source="{Binding Image}">


                    <ei:FluidMoveBehavior InitialTag="DataContext" Duration="0:0:0.5" FloatAbove="True">


                            <CubicEase EasingMode="EaseIn"/>



                            <CubicEase EasingMode="EaseIn"/>










public partial class MainWindow : Window


    public class MyItemType


        public System.Windows.Media.ImageSource Image { get; set; }



    public MainWindow()



        this.DataContext = this;

        MyItems = new ObservableCollection<MyItemType>();

        MyItems.Add(new MyItemType { Image = new BitmapImage(new Uri("pack://application:,,,/FluidMoveTest;component/Resources/Hydrangeas.jpg")) });

        MyItems.Add(new MyItemType { Image = new BitmapImage(new Uri("pack://application:,,,/FluidMoveTest;component/Resources/Koala.jpg")) });

        MyItems.Add(new MyItemType { Image = new BitmapImage(new Uri("pack://application:,,,/FluidMoveTest;component/Resources/Lighthouse.jpg")) });



    public ObservableCollection<MyItemType> MyItems { get; set; }



Final application:



Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: