I am tryin to add rectangle to on to an image in wpf. Rectangle is drawn at MouseLeftButtonDown event.
Problem is I want to add this rectangle straight to the Grid (on to the image) without using a canvas.
How Can I do that? or
How can I avoid using a canvas?

<UserControl>
<Grid x:Name="LayoutRoot" 
        MouseLeftButtonDown= "OnMouseLeftButtonDown"
        MouseLeftButtonUp="OnMouseLeftButtonUp"
        MouseMove="OnMouseMove"
        Background="Transparent"
          >

    <Canvas x:Name="canvas"> 

         <Image Name="image" Source=".....\Penguins.jpg"/>        
         <Rectangle 
                      x:Name="selectionBox"
                       StrokeThickness="1"
                       Stroke="Black"
                       Visibility="Collapsed" 


                       /> 


    </Canvas>
</Grid>
</UserControl>

Thankx in advance

Hi jrosh,
What are you using? Blend or Visual Studio? You didnt join expression forum?
Following are some sources from where you can start studying

WPF==> WPF tutorials at kirupa
You can study silverlight at Microsoft .toolbox free video tutorials (.toolbox)
I hope this will help you :)

Are you student? Looking at your xaml above looks like you are using Visual Studio.
Why dont you put image inside the rectangle.
Sorry but I didnt understand your problem exactly. If this doesnt help please give more details :)

:) Post your solution to complete the thread with answer, if you have found it.

This question has already been answered. Start a new discussion instead.