<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="Analytics.MainPage" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:sa="clr-namespace:Microsoft.WebAnalytics.Behaviors;assembly=Microsoft.WebAnalytics.Behaviors" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:local="clr-namespace:Analytics" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">

    <Grid x:Name="LayoutRoot" Background="White">
        
        <i:Interaction.Behaviors>
            <sa:ConsoleAnalytics />
        </i:Interaction.Behaviors>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="3*" />
            <RowDefinition />
        </Grid.RowDefinitions>
        
        <ScrollViewer>
            <StackPanel>
                <c1:C1TreeView AllowDragDrop="True" SelectionMode="Multiple" Margin="10">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="DragStart">
                            <sa:TrackAction />
                        </i:EventTrigger>
                        <i:EventTrigger EventName="DragDrop">
                            <sa:TrackAction />
                        </i:EventTrigger>
                        <i:EventTrigger EventName="SelectionChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                        <i:EventTrigger EventName="ItemClick">
                            <sa:TrackAction />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    <c1:C1TreeViewItem Header="Item 1">
                        <c1:C1TreeViewItem Header="Item 2" />
                        <c1:C1TreeViewItem Header="Item 3" />
                    </c1:C1TreeViewItem>
                    <c1:C1TreeViewItem Header="Item 4">
                        <c1:C1TreeViewItem Header="Item 5" />
                        <c1:C1TreeViewItem Header="Item 6" />
                    </c1:C1TreeViewItem>
                </c1:C1TreeView>

                <c1:C1RangeSlider Margin="10">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="LowerValueChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                        <i:EventTrigger EventName="UpperValueChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </c1:C1RangeSlider>
                
                <c1:C1Menu Margin="10">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="ItemOpened">
                            <sa:TrackAction />
                        </i:EventTrigger>
                        <i:EventTrigger EventName="ItemClosed">
                            <sa:TrackAction />
                        </i:EventTrigger>
                        <i:EventTrigger EventName="ItemClick">
                            <sa:TrackAction />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    <c1:C1MenuItem Header="Menu 1">
                        <c1:C1MenuItem Header="Menu 2" />
                        <c1:C1MenuItem Header="Menu 3" />
                    </c1:C1MenuItem>
                    <c1:C1MenuItem Header="Menu 4">
                        <c1:C1MenuItem Header="Menu 5" />
                        <c1:C1MenuItem Header="Menu 6" />
                    </c1:C1MenuItem>
                </c1:C1Menu>
                
                <c1:C1ComboBox Margin="10">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="SelectedValueChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                        <i:EventTrigger EventName="SelectedItemChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                        <i:EventTrigger EventName="SelectedIndexChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    <c1:C1ComboBoxItem Content="Combo1" />
                    <c1:C1ComboBoxItem Content="Combo2" />
                    <c1:C1ComboBoxItem Content="Combo3" />
                </c1:C1ComboBox>
                
                <c1:C1TabControl Margin="10">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="SelectionChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                        <i:EventTrigger EventName="TabItemClosed">
                            <sa:TrackAction />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    <c1:C1TabItem Header="Tab 1" CanUserClose="True" />
                    <c1:C1TabItem Header="Tab 2" CanUserClose="True" />
                    <c1:C1TabItem Header="Tab 3" CanUserClose="True" />
                    <c1:C1TabItem Header="Tab 4" CanUserClose="True" />
                </c1:C1TabControl>
                
                <c1:C1Book Margin="10" MaxWidth="200" Height="150">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="CurrentPageChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    <Grid Background="Red" />
                    <Grid Background="Green" />
                    <Grid Background="Blue" />
                    <Grid Background="Yellow" />
                    <Grid Background="Purple" />
                </c1:C1Book>
                
                <c1:C1ColorPicker Margin="10">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="SelectedColorChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </c1:C1ColorPicker>
                
                <c1:C1CoverFlow Margin="10" Height="150">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="SelectedIndexChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    <Grid Background="Red" Width="50" Height="50" />
                    <Grid Background="Green" Width="50" Height="50" />
                    <Grid Background="Blue" Width="50" Height="50" />
                    <Grid Background="Yellow" Width="50" Height="50" />
                    <Grid Background="Purple" Width="50" Height="50" />
                </c1:C1CoverFlow>
                
                <c1:C1PropertyGrid Margin="10">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="ValueChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    <c1:C1PropertyGrid.SelectedObject>
                        <local:DataObject Name="C1" Description="ComponentOne" />
                    </c1:C1PropertyGrid.SelectedObject>
                </c1:C1PropertyGrid>
                
                <c1:C1DataGrid Margin="10" x:Name="dataGrid">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="SelectionChanged">
                            <sa:TrackAction />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </c1:C1DataGrid>
            </StackPanel>
        </ScrollViewer>
        
        <ScrollViewer Grid.Row="1">
            <ItemsControl x:Name="events">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <TextBlock>
                            <Run Text="{Binding Timestamp.TimeOfDay}" />
                            <Run Text="{Binding Name}" FontWeight="Bold" />
                            <Run Text=" " />
                            <Run Text="{Binding ActionValue}" />
                        </TextBlock>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </ScrollViewer>
    </Grid>
</UserControl>