Here is the simple way to access PivotViewer's current selected item and its facets.
PivotItem pi = pivotViewer.GetItem(pivotViewer.CurrentItemId);
if (pi.Facets.ContainsKey("My facet name"))
textBlock.Text = pi.Facets["My facet name"][0];
To Access Title,
pi.Name
For Description, you need to use similar to facet.
pi.Facets["Description"][0];
For URL or Href,
pi.Href
No comments:
Post a Comment