Nov 21 2011

PivotViewer Basics : Client-side Collections

This entry is part 1 of 5 in the series PivotViewer Basics

With the release of Silverlight 5 just around the corner, I thought I would start a series on the new PivotViewer and how to get up and running with it.  We will start the series off by exploring how to create a client side collection.

One of the most anticipated features of the new PivotViewer is the ability to create client-side collections.  PivotViewer accomplishes this by utilizing the traditional ItemsSource property for data and a form of XAML data templates to define the trading card.  It is interesting to note that the fundamental core of PivotViewer is still using the DeepZoom technology.  If you are thinking that DeepZoom only handles images and not XAML, you would be correct.  Under the hood, PivotViewer is rendering the data templates to images and then adding those images to DeepZoom.  Remembering that little tidbit will help later down the road.

Continue reading


Oct 18 2011

SL5 PivotViewer Custom DetailPaneStyle

One of the added API features of the new Silverlight 5 PivotViewer is the ability to define a custom detail pane.  It is rather simple to replace the style with your own, however, then you are left with the task of implementing several features that you most likely want to keep (like when to show and hide your detail pane).  There are also a few other states and navigation features that would also be nice to keep.  We will look at how you can replace the default implementation with the smallest amount of code and keep the functionality that you will want to keep.  If you are a bit more hard core and want to know about all of the in’s and out’s of creating your own implementation from scratch, I will address that in a future PivotViewer post.

(Note: This article is based on the Silverlight 5 RC.  If you are still using the original Silverlight 4 PivotViewer, you can take a look at the PivotViewer Lessons site on CodePlex.)

Continue reading


Sep 5 2011

Extending your CXML Trading Cards in Silverlight 5

In my last post To CXML or not to CXML I mentioned that I found a nifty little user control being used in the single ItemTemplate being returned from the CxmlCollectionSource.ItemTemplates, the PivotViewerMultiScaleSubImageHost (yep, that’s a mouth full).  For a brief recap, this control uses the DeepZoom information for each item in your collection, then downloads and displays the appropriate resolution image.  This allows you to keep to the DeepZoom benefits of scaling and prevents you from downloading the full images and delaying the initial load of the collection.

So I figure if the CxmlCollectionSource can use this little control, why can’t we? Before we get into how we are going to use it, let’s look at how we duplicate what the CxmlCollectionSource is doing.  The ItemTemplates property returns a PivotViewerItemTemplateCollection with a single template in it that looks like this:

<pivot:PivotViewerItemTemplate>
    <pivot:PivotViewerMultiScaleSubImageHost
      CollectionSource="{Binding [VisualCollectionSource][0] }"
      ImageId="{Binding [VisualImageId][0]}"/>
</pivot:PivotViewerItemTemplate>

 

Continue reading


Sep 3 2011

To CXML or not to CXML

[Updated: 09/03/2011]

—————

So it didn’t take me long to find out that this could have been done better.  So code and explanation has been updated.

—————

After what has seemed like forever, the new Silverlight 5 PivotViewer is now available to the public.  As most of you probably know, it did not make the beta and everyone assumed that we would be waiting until the final release before the public would get a copy.  However, the Silverlight team, being the awesome team that they are, decided to cut loose a RC.  If you don’t have it yet, make sure you go download it here:

http://www.silverlight.net/downloads

It has a bunch of great new stuff in it and a lot of improvements to the new things that you saw in the beta.  We will be going over a lot of it in the coming weeks and months, but for now back to my old stomping ground, the PivotViewer.

Continue reading


Apr 26 2011

PivotViewer Lessons Update

Today I released a new lesson on the PivotViewer Lessons (http://pivotviewerlessons.codeplex.com) project.  A commonly asked question I receive is “how do I change the font in the filter pane?”  The latest lesson shows an example of how to tackle that specific problem. 

You can also take a look at the new release here : http://pivotviewer.championds.com

image

The new lesson demonstrates how to change the FontFamily for the entire filter pane or just specific regions (ie Category Names).

Detailed posts on each of the lessons and a few more challenging lessons on in the works.  There is also the new PivotViewer project coming.


Apr 17 2011

PivotViewer vNext Preview

As you might have guessed, I am pretty excited about the next version of the PivotViewer.  We received the first glimpse of it during the keynote of the Silverlight Firestarter last December (http://www.silverlight.net/news/events/firestarter/).  During MIX last week, Nick Kramer gave a talk on “Advanced Features in Silverlight 5” where we saw the new PivotViewer in a bit more detail.  If you haven’t seen Nick’s talk yet, you can watch it online here: http://channel9.msdn.com/events/MIX/MIX11/MED12

image

Continue reading


Jan 11 2011

Reloading a Collection in the PivotViewer

I discovered an interesting tidbit when working on the code for my upcoming PivotViewer series (you can find the code on CodePlex here : http://tonyc.me/pvles).  It seems that you can’t reload the current collection from the server.

First off, I noticed an absence of any sort of “Reload” or “Refresh” method to make this process easy.  So I began to do a little research and tried the following:

To begin with, I simply called LoadCollection() and passed in the Uri.  I promptly noticed that nothing happened. Hmmm… So on to the next step.

Continue reading


Oct 12 2010

MIX 10 Pivot Collection

This past weekend I gave a talk at Houston Tech Fest 2010 about the Silverlight PivotViewer.  For a couple of demos in my talk, I used a collection generated for the MIX 10 video sessions that are online.  I decided to move that collection to our labs server and thought I would talk about it a little here first.

image

MIX 10 Collection : http://labs.championds.com/MIX10/MIX10Collection.cxml

Continue reading