This is a migrated thread and some comments may be shown as answers.

Loading the Images from Hard Disk in Silverlight application

1 Answer 42 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Upendran pv
Top achievements
Rank 1
Upendran pv asked on 12 Sep 2009, 07:40 AM
sample

 <Canvas Margin="20,0,138,0" VerticalAlignment="Top" Height="270">
            <Image x:Name="imgVehicle" Height="190"  Source="../Images/NOIMAGE_VEHICLE.PNG" Width="488.571" Canvas.Left="-19.997" />
            <Image x:Name="imgPlate"  Stretch="None" Source="../Images/NOIMAGE_PLATE.PNG" Canvas.Top="203" Canvas.Left="110" />
        </Canvas>

I want  to load the images like  Source="D:\Images/NOIMAGE_PLATE.PNG"

1 Answer, 1 is accepted

Sort by
0
Hristo Borisov
Telerik team
answered on 12 Sep 2009, 04:53 PM
Hi Upendran,

As you know Silverlight is a cross-browser plug-in which means that the code will be executed on the client's machine. Thus, you cannot assume that every user will have an image with the exact name or location. Rather you should include the image in your SIlverlight or Web application and refer the image to it. The path to the image depends on the build action of the Image itself. Here is a good example that demonstrates all possible ways you can load an image in a Silverlight 2 application, which is essentially the same for Silverlight 3.

Thank you for contacting us.

Greetings,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Upendran pv
Top achievements
Rank 1
Answers by
Hristo Borisov
Telerik team
Share this question
or