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

Jan 12, 2009 at 9:39 AM
Hi,

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

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

Thanks
Jan 13, 2009 at 11:55 PM
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"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Transition Effects" Height="680" Width="800" Background="{DynamicResource BackgroundBrush}">
    <Canvas>
       
  <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"/>
 </Canvas>
</Window>

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.

Thx.