Loading the Images from Hard Disk in Silverlight application

2 posts, 0 answers
  1. Upendran pv
    Upendran pv avatar
    2 posts
    Member since:
    Jul 2009

    Posted 12 Sep 2009 Link to this post

    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"
  2. Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 12 Sep 2009 Link to this post

    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.
Back to Top