Giving Canvas.Top and Canvas.Left values in Effect Examples

Jan 12, 2009 at 10:39 AM

I'm new in Shader Effects and having fun with it.

I know this situation will be very silly but I can't figure it out myself.

The situation is in the effect example if I give a Canvas.Top & Canvas.Left properties in image elements at TransitionWindow the effects doesn't work correctly.

The old image moves again with given Canvas attatched properties.

Is there something I'm missing?

Jun-Hee Lee

Jan 13, 2009 at 9:05 AM
Hi Jun-Hee Lee.
I am not sure I understand. Can you post the code (XAML) you are using?

Jan 14, 2009 at 12:55 AM
Hi jaimer,

Thanks for giving my discussion a look.

The XAML code of TransitionsWindows.xaml in ShaderDemoApp project looks like this.

<Window x:Class="ExtensibleDemoApp.TransitionsWindow"
    Title="Transition Effects" Height="680" Width="800" Background="{DynamicResource BackgroundBrush}">
  <Image x:Name="oldChild" Canvas.Top="100" Canvas.Left="100" Width="600" Height="480" Stretch="UniformToFill" Opacity="1"  />  
  <Image x:Name="currentChild" Canvas.Top="100" Canvas.Left="100" Width="600" Height="480" Stretch="UniformToFill"/>    
  <TextBlock Text="" Canvas.Left="350" Canvas.Top="610" x:Name="effectName"/>

I added or changed the BOLD parts.

When you run the Application and click Transition Button you will see the transition effects runs.

But you will see the old image will overlap in wrong position.