UPDATE 2-Oct-08: Deep Zoom Tag Cloud example updated for RC0
Adding tags within the latest Deep Zoom Composer is a neat way to navigate DeepZoom 'Collections'.
But if we are going to introduce a new file (Metadata.xml) why not really leverage it?
To that end, I've added a Description element to the Metadata.xml file and typed my own descriptions for each image in my collection. There are two new
TextBlock
s in the Silverlight control to show the data, and whenever your mouse is over an image, its Tag and Description are displayed. Try it out (beta 2) (or RC0).The code to match extract the description is a simple extension of the Tag sample.
Then we need to add some code to the
MouseMove
event to see what SubImage
we're over:which uses
SubImageHitTest()
from ProjectSilverlight to determine the index of the image to show Tag/Description for.Finally, you'll notice the 'browse by tag' is now a very basic "cloud". To accomplish that I replaced the ListBox with WrapPanel for Silverlight 2.0 off CodeProject, replaced the items with Buttons and added this
ControlTemplate
:The updated files are Page.xaml.cs and Page.xaml.
This comment has been removed by the author.
ReplyDeleteCraig.
ReplyDeleteAfter editing the specified files and adding the Silverlight toolkit Microsoft.Windows.Controls references I still get the following errors as unfound references
ContentPresenter
and WrapPanel:WrapPanel
could you offer any help? do you still have a project source zip?
Unfortunately I really can't find the source I was using for that stuff. The WrapPanel was off CodeProject.com (mentioned in the post); not sure what the ContentPresenter problem is.
ReplyDeleteI don't think there's a lot of code involved; you could always use Reflector to decompile it.
If I do find the stuff on a backup somewhere I'll post the whole solution; not sure why I didn't upload the whole thing last year...
Thanks Craig that would be much appreciated.
ReplyDeleteWe are having alot of trouble applying these changes. Oh and I did get the proper WrapPanel. That was a small oversite.. but the project still doesn't build.
Hi Craig
ReplyDeleteI am having the same issues as Mark, so wondered if you had found your previous code. You are the only person i can find that has got multiple tags working. So it would be great to get it working as single tages just arent enough for my project.
thanks
Tim
Tim, I just responded to Mark on another post. The source is downloadable from http://www.deepzoompublisher.com/TagUpdater/DeepZoomTagCloud_v0.5.zip. I make no guarantees about the quality of the code tho' - I haven't looked at it in a while.
ReplyDelete