<UserControl
    x:Class="SLControlsInfoV3.MainPage"
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:dv="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400"
    Loaded="UserControl_Loaded">

    <Grid
        x:Name="LayoutRoot"
        Background="White">
        <Grid.RowDefinitions>
            <RowDefinition
                Height="Auto" />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <StackPanel
            Grid.Row="0"
            Grid.Column="0"
            Grid.ColumnSpan="2">
            <TextBlock
                x:Name="TitleTextBlock"
                Text="Silverlight 4 Beta Control Details"
                FontSize="18"
                TextAlignment="Center" />
            <TextBlock
                x:Name="InstructionsTextBlock"
                Text="Click on a slice in the pie charts below to filter the grid"
                TextAlignment="Center" />
        </StackPanel>
        <dv:Chart
            x:Name="NamespacesChart"
            Grid.Row="1"
            Grid.Column="0"
            Title="Namespaces">
            <dv:PieSeries
                IsSelectionEnabled="True"
                SelectionChanged="Pie_SelectionChanged"
                IndependentValueBinding="{Binding Key}"
                DependentValueBinding="{Binding Count}"
                Tag="NamespaceName" />
        </dv:Chart>
        <dv:Chart
            x:Name="AssembliesChart"
            Grid.Row="1"
            Grid.Column="2"
            Title="Assemblies">
            <dv:PieSeries
                IsSelectionEnabled="True"
                SelectionChanged="Pie_SelectionChanged"
                IndependentValueBinding="{Binding Key}"
                DependentValueBinding="{Binding Count}" 
                Tag="AssemblyName" />
        </dv:Chart>
        <data:DataGrid
            x:Name="ControlDetailsGrid"
            AutoGenerateColumns="True"
            Grid.Row="2"
            Grid.Column="0"
            Grid.ColumnSpan="2"
            />
    </Grid>
</UserControl>
