Xamlhouse > Microsoft Silverlight Exploration

Deep Zoom, Listbox and MediaElement issues

There are a few issues that we have had recently with the DeepZoom, listbox, and MediaElement. With the DeepZoom, we had the problem of it chugging if there were a lot of images (say like…. 200). So we tried to cut it down in half (100 images).. still very slow, and now finally I think we have 20. It might just be because we have so many other things going on at the same time, and it just can’t handle it, but, just thought I would put that out there.The next thing on the list is well.. the listbox. What we wanted was different lines of text with different styles inside the listbox item. Now I knew how to do it in XAML, but not dynamically in C#. What I eventually came up with was this:

Now the MediaElement… our News Section (in which we want to have news items with video posts in them) is a User Control inside the project. When it was a project itself, I could get videos to work by just importing them and setting the source of the MediaElement. However this time, it wasn’t working, tried putting it in all different kinds of folders but it just wouldn’t work. What I ended up doing was setting the source to the full path. If you are running the video locally you can do something like “http://localhost/nameofvideo.wmv”, on the web you have to do something similar to this: “http://www.mydomain.com/mysubdirectory/mymovie.wmv” (you can use this url locally too). To do this dynamically, try something like this:

That’s it! Check back soon (in a few days) and we will have a post about the project!

-Andy, Anna, Jess

 Digg this

No comments yet. Be the first.

Leave a reply