Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you align a canvas background in WPF?

I have set a canvas' background to an image of a company logo. I would like for this image to be aligned to the bottom right corner of the canvas.
Is it possible to do this, or would it require for the image to be added into the canvas as a child? That would not work with this program as all children of the canvas are handled differently.

Thank You

like image 791
Totty Avatar asked Nov 06 '08 16:11

Totty


1 Answers

Will this work? (It worked for me, anyway.)

  <Canvas>
    <Canvas.Background>
      <ImageBrush ImageSource="someimage.jpg" AlignmentX="Right" 
          AlignmentY="Bottom" Stretch="None" />
    </Canvas.Background>
  </Canvas>
like image 95
Ryan Lundy Avatar answered Oct 31 '22 08:10

Ryan Lundy