sorghumking
sorghumking

Reputation: 46

PivotViewer: Trading Card Visibility

I'm developing a PivotViewer (Silverlight 5) control that makes use of Semantic Zoom. There are two trading card templates, a "small" template displaying a low-resolution image, and a "big" template displaying a higher-resolution version of the same image and some text.

The low-resolution images are bundled in the XAP file. I'd like to dynamically download and display a trading card's higher-resolution image when the high-res version of that template becomes visible. But the best I've been able to do thus far is downloading the image when the trading card is selected through SelectionChanged, as seen here:

http://www.beerolf.com/pivottest/SilverlightLoadTest.html

(When you click a trading card, you should see text saying "Big!!!" indicating that the high-res image is being used. If you zoom into a trading card before clicking it, the original image remains.)

This is okay, but I don't want to force users to click trading cards to see higher-resolution images. Is there any way to determine which trading cards are currently visible?

Upvotes: 1

Views: 170

Answers (1)

Tony Champion - CDS
Tony Champion - CDS

Reputation: 865

The trick with multiple templates is to get the sizing right.

In the example that you gave, the templates are loading fairly large since there are not that many of them. In a case like that, you are most likely going straight to the larger template.

I would put the source url of the high-res in your larger templates, so they will load automatically. Is there a reason you aren't doing this?

Upvotes: 0

Related Questions