locked
FluidMoveBehavior Not Working in Blend 4 RRS feed

  • Question

  • I have a problem with FluidMoveBehavior not working in Blend 4.  I have seen other questions regarding it not working in the Blend 4 but working in Blend 3, but have seen no real answers that solve the problem.  I am doing the tutorial on Animation with Fluidmovebehavior at http://www.microsoft.com/expression/resources/BlendTraining/Day.aspx?day=3, and here is the really simple XAML of my sample page.  When I load the page, everything appears, but no animation is present.  Has anyone else experienced a similar problem, or perhaps come up with a solution?

    <UserControl
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
     x:Class="FluidMoveLesson.MainPage"
     Width="640" Height="480">

     <Grid x:Name="LayoutRoot">
      <Grid.Background>
       <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="Black" Offset="0"/>
        <GradientStop Color="White" Offset="1"/>
       </LinearGradientBrush>
      </Grid.Background>
      <StackPanel Margin="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
       <i:Interaction.Behaviors>
        <ei:FluidMoveBehavior AppliesTo="Self" Duration="0:0:1" />
       </i:Interaction.Behaviors>
       <Button Content="Button" Width="75" Margin="5,0,0,0"/>
       <Button Content="Button" Width="75" Margin="5,0,0,0"/>
       <Button Content="Button" Width="75" Margin="5,0,0,0"/>
       <Button Content="Button" Width="75" Margin="5,0,0,0"/>
       <Button Content="Button" Width="75" Margin="5,0,0,0"/>
      </StackPanel>
     </Grid>
    </UserControl>

     

    Monday, December 27, 2010 1:53 AM

All replies

  • Howdy,

    I got to say that the sample is pretty week and doesnt really give a chance to explain the power of FluidMoveBehavior.

    None the less, the issue here is that you need to give the control time to load the elements and I have added a EaseY easing function to really make it wild.. try the small modification here to see it working.

     <Grid x:Name="LayoutRoot">
     <Grid.Background>
      <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
      <GradientStop Color="Black" Offset="0"/>
      <GradientStop Color="White" Offset="1"/>
      </LinearGradientBrush>
     </Grid.Background>
     <StackPanel Margin="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
     	<i:Interaction.Behaviors>
     		<ei:FluidMoveBehavior Duration="0:0:2" >
     			<ei:FluidMoveBehavior.EaseY>
     				<BackEase EasingMode="EaseIn" Amplitude="10"/>
     			</ei:FluidMoveBehavior.EaseY>
     		</ei:FluidMoveBehavior>
     	</i:Interaction.Behaviors>
      <Button Content="Button" Width="75" Margin="5,0,0,0"/>
      <Button Content="Button" Width="75" Margin="5,0,0,0"/>
      <Button Content="Button" Width="75" Margin="5,0,0,0"/>
      <Button Content="Button" Width="75" Margin="5,0,0,0"/>
      <Button Content="Button" Width="75" Margin="5,0,0,0"/>
     </StackPanel>
     </Grid>
    </UserControl>
    

    HTH

    Cheers


    Expression MVP

    my blog : http://x-coders.com/blogs/sneaky/default.aspx

    Wednesday, December 29, 2010 8:24 PM
    Moderator