tags:

views:

47

answers:

1

Hello,

In my on going quest to learn C#, both winforms and WPF, I have whipped up a program similar to visio in WPF. Its using the new WPF ribbon control, and am using a expander to hold some basic shapes that can be made in Xaml(ie. Ellipse), and the shapes are stored in a 'shapebox' that the shapes can later be dragged onto the form and manipulated from there.

None of the current shapes are from images, which is my next goal. What Im looking to do is load the images via XAML and add them to this shapebox just the same. The shapebox is a custom class.

My question is this: How would I go about loading images from file using only xaml?

+1  A: 

I found the information I was after.

Simply loading an image using xaml is:

<Image Source="/blah/image.png" />

This works for Images included, not external. To load external images Im not sure.

Rekar
For external images, just use a different URI(http://msdn.microsoft.com/en-us/library/aa970069.aspx) for the source property.
karmicpuppet