images not displaying

Jun 7, 2010 at 7:26 PM
I have the Silverlight application running, but I cannot get it to display the images for teaser or the main image. Has anyone else had this issue?
Jun 7, 2010 at 9:49 PM

Can you submit sample project in Issue Tracker section?

Jun 10, 2010 at 1:33 PM
I'm pretty sure the issue I am experiencing is due to my webserver being closed off to the internet. Is there a simple way to create an images directory and have the XML document point to a image within the filesystem?
Jun 11, 2010 at 3:37 AM

as is, it is not possible to reference an image on filesystem, only on the web with correct and accessible url.


Jun 16, 2010 at 9:02 PM
I was able to solve the problem I was experiencing which allowed me to construct the URL path to my images by just adding the image location in the XML document in the following manner: <event title="Example" start="06/16/2010" end="" isDuration="false" color="Red" teaserimage="images/example1.jpg" image="images/example2.jpg" link="" > Example event description </event> I made the following changes to implement this solution: I have three web servers (DEV, TEST, & PROD) that all have an environment variable called "server_environment" with a value of "DEV", "TEST", or "PROD". 1) Added a hidden field to the web page that hosts the Silverlight Timeline control [hdnEnvironment] 2) Added the following code to the Defalut.aspx.cs code behind within the Page_Load() event: string currentEnvironemnt = System.Environment.GetEnvironmentVariable("server_environment"); if (!string.IsNullOrEmpty(currentEnvironemnt)) { switch (currentEnvironemnt) { case "DEV": hdnEnvironment.Value = "http://<devserver>/<site>/"; break; case "TEST": hdnEnvironment.Value = "http://<testserver>/<site>/"; break; case "PROD": hdnEnvironment.Value = "http://<prodserver>/<site>/"; break; default: break; } } 3) Added a new property to TimelineTray.cs private string m_httpPrefix; /// /// <summary> /// This HttpPrefix used to determine which web server environment /// the application is running within.</summary> /// public string HttpPrefix { get { return m_httpPrefix; } set { Debug.Assert(value != null && value.Length > 0); m_httpPrefix = value; } } 4) Updated the MainPage() constructor in MainPage.xaml.cs public MainPage() { try { InitializeComponent(); // Get reference to hidden field on default.aspx page HtmlElement hiddenEnvironment = HtmlPage.Document.GetElementById("hdnEnvironment"); // Read value of hidden field into memory string currentEnvironmentPrefix = hiddenEnvironment.GetProperty("Value").ToString(); // Pass hidden field value [prefix] to the TimelineTray class timeline.HttpPrefix = currentEnvironmentPrefix; } catch (Exception ex) { ex.Message.ToString(); } } 5) Updated the LoadEventDocument(XDocument doc) method in TimelineTray.cs ev.EventImage = e.EventImage == null ? String.Empty : HttpPrefix + e.EventImage; ev.TeaserEventImage = e.TeaserEventImage == null ? String.Empty : HttpPrefix + e.TeaserEventImage; Done! The code works well and was easy to extend. I also added additional properties to allow me to specify .wmv files that I can display within the EventDetailsWindow.xaml. Thanks for the great codebase!