Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
675
how to show an image in a grid
posted

Hi,

yes I've had a look on the examples, but they don't realy helped me.

I want to show data of machines in a grid. I get the machine data from a database, and each machine has also an jpg in the filesystem. The machine class has a property with the filename (absolute path).

I have also a XamGrid on a page and set the ItemSource to an ObservableCollection(of clsMachine). The grid has an imageColumn, and the key of these column corresponds with the propertyname, which holds the filename.

But there are no images after running the project.

Can anyone help me?

Bodo

  • 40030
    Verified Answer
    Offline posted

    Hi Bodo, 

    Silverlight can't load anything from the file system directly due to security constraints. Instead, you would have to make the image a local resource, or host it from a server.

    -SteveZ