Represents a control that enables a user to present and interact with a large amount of data.
<TemplatePartAttribute(Name := "PART_ZoomInButton", Type := GetType(Button))> _ <TemplatePartAttribute(Name := "PART_Container", Type := GetType(Grid))> _ <ScriptableTypeAttribute> _ <TemplatePartAttribute(Name := "PART_AppliedFiltersToolTip", Type := GetType(ToolTip))> _ <TemplatePartAttribute(Name := "PART_SortPropertySelector", Type := GetType(Selector))> _ <TemplatePartAttribute(Name := "PART_ViewSwitcher", Type := GetType(Selector))> _ <TemplatePartAttribute(Name := "PART_AppliedFiltersBreadcrumb", Type := GetType(ItemsControl))> _ <TemplatePartAttribute(Name := "PART_ZoomSlider", Type := GetType(Slider))> _ <TemplatePartAttribute(Name := "PART_ZoomOutButton", Type := GetType(Button))> _ Public Class PivotViewer _ Inherits Control
[TemplatePartAttribute(Name = "PART_ZoomInButton", Type = typeof(Button))] [TemplatePartAttribute(Name = "PART_Container", Type = typeof(Grid))] [ScriptableTypeAttribute] [TemplatePartAttribute(Name = "PART_AppliedFiltersToolTip", Type = typeof(ToolTip))] [TemplatePartAttribute(Name = "PART_SortPropertySelector", Type = typeof(Selector))] [TemplatePartAttribute(Name = "PART_ViewSwitcher", Type = typeof(Selector))] [TemplatePartAttribute(Name = "PART_AppliedFiltersBreadcrumb", Type = typeof(ItemsControl))] [TemplatePartAttribute(Name = "PART_ZoomSlider", Type = typeof(Slider))] [TemplatePartAttribute(Name = "PART_ZoomOutButton", Type = typeof(Button))] public class PivotViewer : Control
The PivotViewer type exposes the following members.
The PivotViewer control enables you to display a large amount of data at once in a way that is easily consumable by the user. Users can browse the data in such a way that helps them see the trends and quickly find information they need.
The PivotViewer control is available as part of the libraries in the Silverlight Software Development Kit (SDK). For more information, see the Silverlight Tools.
To provide items to be filtered and displayed in the PivotViewer control, set the ItemsSource property.
Use the PivotViewerItemTemplate and ItemTemplates to display the items in the PivotViewer control.
To try a PivotViewer sample, click the following link.
Download this sample
The following example creates a PivotViewer control that displays employee information in a company.
<Grid x:Name="LayoutRoot" Background="White"> <sdk:PivotViewer x:Name="MyPV"> <!--Setting PivotProperties--> <sdk:PivotViewer.PivotProperties> <sdk:PivotViewerStringProperty Id="FName" Options="CanFilter" DisplayName="First Name" Binding="{Binding FirstName}" /> <sdk:PivotViewerStringProperty Id="LName" Options="CanFilter" DisplayName="Last Name" Binding="{Binding LastName}" /> <sdk:PivotViewerDateTimeProperty Id="Birthdate" Options="CanFilter" DisplayName="Birthdate" Binding="{Binding Birthdate}" /> </sdk:PivotViewer.PivotProperties> <!--Setting data--> <sdk:PivotViewer.ItemTemplates> <sdk:PivotViewerItemTemplate> <Border Width="200" Height="200" Background="Blue"> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding FirstName}" FontSize="16" Foreground="White" /> <TextBlock Text="{Binding LastName}" FontSize="16" Foreground="White" /> </StackPanel> </Border> </sdk:PivotViewerItemTemplate> </sdk:PivotViewer.ItemTemplates> </sdk:PivotViewer> </Grid>
public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); ObservableCollection<Employee> employeelist = new ObservableCollection<Employee>(); employeelist.Add(new Employee("Albert", "Rinoff", new DateTime(1949, 06, 04), "Sales", "212", "Senior Account Representative", "555-324-5479", "555-548-8896")); employeelist.Add(new Employee("Bertha", "Smith", new DateTime(1968, 07, 12), "Marketing", "324", "Copy Editor", "555-324-4690", "555-713-8843")); employeelist.Add(new Employee("Larry", "Summers", new DateTime(1952, 08, 25), "R $amp; D", "150", "Software Engineer", "555-324-2548", "555-713-8219")); employeelist.Add(new Employee("Susan", "Stendy", new DateTime(1953, 09, 05), "Marketing", "334", "International Campaign Manager", "555-324-1630", "555-986-2154")); employeelist.Add(new Employee("Mary", "Gomez", new DateTime(1965, 10, 09), "Sales", "210", "Associate Account Representative", "555-548-7474", "555-986-4748")); employeelist.Add(new Employee("Mary", "Rodrigues", new DateTime(1976, 04, 11), "R $amp; D", "140", "Lead Software Engineer", "555-324-3038", "555-548-7474")); MyPV.ItemsSource = employeelist; } } public class Employee { public string FirstName { get; set; } public string LastName { get; set; } public DateTime? Birthdate { get; set; } public string Department { get; set; } public string Office { get; set; } public string Title { get; set; } public string OfficePhone { get; set; } public string PersonalPhone { get; set; } public Employee(string firstname, string lastname, DateTime? birthDate, string department, string office, string title, string officePhone, string personalPhone) { this.FirstName = firstname; this.LastName = lastname; this.Birthdate = birthDate; this.Department = department; this.Office = office; this.Title = title; this.OfficePhone = officePhone; this.PersonalPhone = personalPhone; } }
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.