<Window x:Class="CustomUI.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="ComponentOne OLAP for WPF" Height="650" Width="800" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <c1:C1Toolbar ShowCollapseButton="True" ShowHelpButton="True" HelpClick="C1Toolbar_HelpClick">
            <c1:C1ToolbarTabItem Header="Home">
                <c1:C1ToolbarGroup Header="Views">
                    <c1:C1ToolbarGroup.GroupSizeDefinitions>
                        <c1:C1ToolbarGroupSizeDefinition>
                            <c1:C1ToolbarControlSize>Large</c1:C1ToolbarControlSize>
                            <c1:C1ToolbarControlSize>Large</c1:C1ToolbarControlSize>
                            <c1:C1ToolbarControlSize>Medium</c1:C1ToolbarControlSize>
                        </c1:C1ToolbarGroupSizeDefinition>
                    </c1:C1ToolbarGroup.GroupSizeDefinitions>
                    <c1:C1ToolbarDropDown LabelTitle="View By" LargeImageSource="/Resources/Toolbar/Table-View.png">
                        <c1:C1ToolbarDropDown.Menu>
                            <ContextMenu>
                                <MenuItem x:Name="menuViewSalesPerson" Header="Sales Person" Click="menuViewSalesPerson_Click" />
                                <MenuItem x:Name="menuViewProduct" Header="Product" Click="menuViewProduct_Click" />
                                <MenuItem x:Name="menuViewCountry" Header="Country" Click="menuViewCountry_Click" />
                            </ContextMenu>
                        </c1:C1ToolbarDropDown.Menu>
                    </c1:C1ToolbarDropDown>
                    <c1:C1ToolbarDropDown LabelTitle="Price&#10;Filter" LargeImageSource="/Resources/Toolbar/Filter-Currency.png">
                        <c1:C1ToolbarDropDown.Menu>
                            <ContextMenu>
                                <MenuItem x:Name="menuFilterExpensive1" Header="$$$ Expensive" Click="menuFilterExpensive1_Click"/>
                                <MenuItem x:Name="menuFilterExpensive2" Header="$$ Moderate" Click="menuFilterExpensive2_Click"/>
                                <MenuItem x:Name="menuFilterExpensive3" Header="$ Inexpensive" Click="menuFilterExpensive3_Click"/>
                                <MenuItem x:Name="menuFilterAllPrices" Header="* All Prices" Click="menuFilterAllPrices_Click"/>
                            </ContextMenu>
                        </c1:C1ToolbarDropDown.Menu>
                    </c1:C1ToolbarDropDown>
                    <c1:C1ToolbarButton x:Name="btnSaveView" LabelTitle=" Save View" SmallImageSource="/Resources/Toolbar/Save.png" Click="btnSaveView_Click"/>
                    <c1:C1ToolbarButton x:Name="btnOpenView" LabelTitle=" Open View" SmallImageSource="/Resources/Toolbar/Open.png" Click="btnOpenView_Click"/>
                </c1:C1ToolbarGroup>
                <c1:C1ToolbarGroup Header="Pivot Grid">
                    <c1:C1ToolbarGroup.GroupSizeDefinitions>
                        <c1:C1ToolbarGroupSizeDefinition>
                            <c1:C1ToolbarControlSize>Large</c1:C1ToolbarControlSize>
                        </c1:C1ToolbarGroupSizeDefinition>
                    </c1:C1ToolbarGroup.GroupSizeDefinitions>
                    <c1:C1ToolbarDropDown LabelTitle="Row&#10;Totals" LargeImageSource="/Resources/Toolbar/Table-Row-Totals.png">
                        <c1:C1ToolbarDropDown.Menu>
                            <ContextMenu>
                                <MenuItem x:Name="menuRowGrandTotals" IsCheckable="True" IsChecked="True" Header="Grand Totals" Click="menuRowGrandTotals_Checked"/>
                                <MenuItem x:Name="menuRowSubtotals" IsCheckable="True" Header="Subtotals" Click="menuRowSubtotals_Checked"/>
                                <MenuItem x:Name="menuRowNoTotals" IsCheckable="True"  Header="None" Click="menuRowNoTotals_Checked"/>
                            </ContextMenu>
                        </c1:C1ToolbarDropDown.Menu>
                    </c1:C1ToolbarDropDown>
                    <c1:C1ToolbarDropDown LabelTitle="Column&#10;Totals" LargeImageSource="/Resources/Toolbar/Table-Column-Totals.png">
                        <c1:C1ToolbarDropDown.Menu>
                            <ContextMenu>
                                <MenuItem x:Name="menuColumnGrandTotals" IsCheckable="True" IsChecked="True" Header="Grand Totals" Click="menuColumnGrandTotals_Checked"/>
                                <MenuItem x:Name="menuColumnSubtotals" IsCheckable="True" Header="Subtotals" Click="menuColumnSubtotals_Checked"/>
                                <MenuItem x:Name="menuColumnNoTotals" IsCheckable="True" Header="None" Click="menuColumnNoTotals_Checked"/>
                            </ContextMenu>
                        </c1:C1ToolbarDropDown.Menu>
                    </c1:C1ToolbarDropDown>
                    <c1:C1ToolbarToggleButton x:Name="btnShowZeros" IsChecked="True" LabelTitle="Show&#10;Zeros" LargeImageSource="/Resources/Toolbar/Show-Zeros.png" Click="btnShowZeros_Click"/>
                </c1:C1ToolbarGroup>
                <c1:C1ToolbarGroup Header="Export">
                    <c1:C1ToolbarGroup.GroupSizeDefinitions>
                        <c1:C1ToolbarGroupSizeDefinition>
                            <c1:C1ToolbarControlSize>Large</c1:C1ToolbarControlSize>
                            <c1:C1ToolbarControlSize>Large</c1:C1ToolbarControlSize>
                            <!--<c1:C1ToolbarControlSize>Large</c1:C1ToolbarControlSize>-->
                            <c1:C1ToolbarControlSize>Medium</c1:C1ToolbarControlSize>
                        </c1:C1ToolbarGroupSizeDefinition>
                    </c1:C1ToolbarGroup.GroupSizeDefinitions>
                    <c1:C1ToolbarButton x:Name="btnPrint" LabelTitle="Print" LargeImageSource="/Resources/Toolbar/Print.png" Click="btnPrint_Click"/>
                    <c1:C1ToolbarButton x:Name="btnPrintSettings" LabelTitle="Print&#10;Options" LargeImageSource="/Resources/Toolbar/Print-Options.png" Click="btnPrintSettings_Click"/>
                    <!--<c1:C1ToolbarButton x:Name="btnExportExcel" LabelTitle="Export&#10;Excel" LargeImageSource="/Resources/Toolbar/Export-Excel.png" Click="btnExportExcel_Click"/>-->
                    <c1:C1ToolbarButton x:Name="btnExportCSV" LabelTitle=" Export CSV" SmallImageSource="/Resources/Toolbar/Export-CSV.png" Click="btnExportCSV_Click" />
                    <c1:C1ToolbarButton x:Name="btnExportHtml" LabelTitle=" Export HTML" SmallImageSource="/Resources/Toolbar/Export-HTML.png" Click="btnExportHtml_Click" />
                    <c1:C1ToolbarButton x:Name="btnExportText" LabelTitle=" Export Text" SmallImageSource="/Resources/Toolbar/Export-Text.png" Click="btnExportText_Click" />
                </c1:C1ToolbarGroup>
                <c1:C1ToolbarGroup Header="Update">
                    <c1:C1ToolbarButton x:Name="btnRefresh" LabelTitle="Update" LargeImageSource="/Resources/Toolbar/Table-Refresh.png" Click="btnRefresh_Click" />
                    <c1:C1ToolbarButton x:Name="btnUndo" LabelTitle=" Undo" SmallImageSource="/Resources/Toolbar/Undo.png" />
                    <c1:C1ToolbarButton x:Name="btnRedo" LabelTitle=" Redo" SmallImageSource="/Resources/Toolbar/Redo.png" />
                </c1:C1ToolbarGroup>
            </c1:C1ToolbarTabItem>
            <c1:C1ToolbarTabItem Header="Chart">
                <c1:C1ToolbarGroup Header="Settings">
                    <c1:C1ToolbarGroup.GroupSizeDefinitions>
                        <c1:C1ToolbarGroupSizeDefinition>
                            <c1:C1ToolbarControlSize>Large</c1:C1ToolbarControlSize>
                            <c1:C1ToolbarControlSize>Large</c1:C1ToolbarControlSize>
                            <c1:C1ToolbarControlSize>Large</c1:C1ToolbarControlSize>
                            <c1:C1ToolbarControlSize>Medium</c1:C1ToolbarControlSize>
                        </c1:C1ToolbarGroupSizeDefinition>
                    </c1:C1ToolbarGroup.GroupSizeDefinitions>
                    <c1:C1ToolbarDropDown LabelTitle="Palette" LargeImageSource="/Resources/Toolbar/Colors-Change.png">
                        <c1:C1ToolbarDropDown.Menu>
                            <ContextMenu x:Name="menuChartPalette">
                                <MenuItem Header="Apex" Click="menuPalette_Click"/>
                                <MenuItem Header="Aspect" Click="menuPalette_Click"/>
                                <MenuItem Header="Civic" Click="menuPalette_Click"/>
                                <MenuItem Header="Concourse" Click="menuPalette_Click"/>
                                <MenuItem Header="Equity" Click="menuPalette_Click"/>
                                <MenuItem Header="Flow" Click="menuPalette_Click"/>
                                <MenuItem Header="Foundry" Click="menuPalette_Click"/>
                                <MenuItem Header="GrayScale" Click="menuPalette_Click"/>
                                <MenuItem Header="Median" Click="menuPalette_Click"/>
                                <MenuItem Header="Metro" Click="menuPalette_Click"/>
                                <MenuItem Header="Module" Click="menuPalette_Click"/>
                                <MenuItem Header="Office" IsChecked="True" Click="menuPalette_Click"/>
                                <MenuItem Header="Opulent" Click="menuPalette_Click"/>
                                <MenuItem Header="Oriel" Click="menuPalette_Click"/>
                                <MenuItem Header="Origin" Click="menuPalette_Click"/>
                                <MenuItem Header="Paper" Click="menuPalette_Click"/>
                                <MenuItem Header="Solstice" Click="menuPalette_Click"/>
                                <MenuItem Header="Standard" Click="menuPalette_Click"/>
                                <MenuItem Header="Technic" Click="menuPalette_Click"/>
                                <MenuItem Header="Trek" Click="menuPalette_Click"/>
                                <MenuItem Header="Urban" Click="menuPalette_Click"/>
                                <MenuItem Header="Verve" Click="menuPalette_Click"/>
                                <ContextMenu.ItemContainerStyle>
                                    <Style TargetType="MenuItem">
                                        <Setter Property="IsCheckable" Value="True" />
                                    </Style>
                                </ContextMenu.ItemContainerStyle>
                            </ContextMenu>
                        </c1:C1ToolbarDropDown.Menu>
                    </c1:C1ToolbarDropDown>
                    <c1:C1ToolbarToggleButton x:Name="btnChartStacked" LabelTitle="Stacked" IsChecked="True" LargeImageSource="/Resources/Toolbar/Stack.png" Click="btnChartStacked_Click"/>
                    <c1:C1ToolbarToggleButton x:Name="btnChartTotals" LabelTitle="Totals" LargeImageSource="/Resources/Toolbar/Sum.png" Click="btnChartTotals_Click"/>
                    <c1:C1ToolbarToggleButton x:Name="btnChartTitle" LabelTitle=" Title" IsChecked="True" SmallImageSource="/Resources/Toolbar/Chart-Title.png" Click="btnChartTitle_Click" />
                    <c1:C1ToolbarToggleButton x:Name="btnChartGridlines" LabelTitle=" Gridlines" IsChecked="True" SmallImageSource="/Resources/Toolbar/Gridlines-Both.png" Click="btnChartGridlines_Click"/>
                    <c1:C1ToolbarToggleButton x:Name="btnChartLegend" LabelTitle=" Legend" IsChecked="True" SmallImageSource="/Resources/Toolbar/Chart-Legend.png" Click="btnChartLegend_Click" />
                </c1:C1ToolbarGroup>
                <c1:C1ToolbarGroup Header="Chart Type">
                    <c1:C1ToolbarGroup.GroupSizeDefinitions>
                        <c1:C1ToolbarGroupSizeDefinition>
                            <c1:C1ToolbarControlSize>Large</c1:C1ToolbarControlSize>
                        </c1:C1ToolbarGroupSizeDefinition>
                    </c1:C1ToolbarGroup.GroupSizeDefinitions>
                    <c1:C1ToolbarToggleButton x:Name="btnChartType_Bar" GroupName="ChartType" LabelTitle="Bar" LargeImageSource="/Resources/Toolbar/Chart-Bar.png" Checked="btnChartType_Bar_Checked" />
                    <c1:C1ToolbarToggleButton x:Name="btnChartType_Column" GroupName="ChartType" LabelTitle="Column" LargeImageSource="/Resources/Toolbar/Chart.png" Checked="btnChartType_Column_Checked"/>
                    <c1:C1ToolbarToggleButton x:Name="btnChartType_Area" GroupName="ChartType" LabelTitle="Area" LargeImageSource="/Resources/Toolbar/Chart-Area.png" Checked="btnChartType_Area_Checked"/>
                    <c1:C1ToolbarToggleButton x:Name="btnChartType_Line" GroupName="ChartType" LabelTitle="Line" LargeImageSource="/Resources/Toolbar/Chart-Line.png" Checked="btnChartType_Line_Checked"/>
                    <c1:C1ToolbarToggleButton x:Name="btnChartType_Scatter" GroupName="ChartType" LabelTitle="Scatter" LargeImageSource="/Resources/Toolbar/Chart-Point.png" Checked="btnChartType_Scatter_Checked"/>
                    <c1:C1ToolbarToggleButton x:Name="btnChartType_Pie" GroupName="ChartType" LabelTitle="Pie" LargeImageSource="/Resources/Toolbar/Chart-Pie.png" Checked="btnChartType_Pie_Checked"/>
                </c1:C1ToolbarGroup>
            </c1:C1ToolbarTabItem>
            <c1:C1ToolbarTabItem Header="View">
                <c1:C1ToolbarGroup Header="Tabs">
                    <c1:C1ToolbarGroup.GroupSizeDefinitions>
                        <c1:C1ToolbarGroupSizeDefinition>
                            <c1:C1ToolbarControlSize>Large</c1:C1ToolbarControlSize>
                        </c1:C1ToolbarGroupSizeDefinition>
                    </c1:C1ToolbarGroup.GroupSizeDefinitions>
                    <c1:C1ToolbarToggleButton x:Name="btnViewLock" LabelTitle="Unlocked" LargeImageSource="/Resources/Toolbar/Unlock.png" Click="btnViewLock_Click"/>
                    <c1:C1ToolbarDropDown LabelTitle="Tabs" LargeImageSource="/Resources/Toolbar/Tab-Sheet.png">
                        <c1:C1ToolbarDropDown.Menu>
                            <ContextMenu x:Name="menuTabs">
                                <MenuItem x:Name="menuFieldListTab" IsCheckable="True" IsChecked="True" Header="Field List" Click="menuFieldListTab_Click"/>
                                <MenuItem x:Name="menuPivotGridTab" IsCheckable="True" IsChecked="True" Header="Pivot Grid" Click="menuPivotGridTab_Click"/>
                                <MenuItem x:Name="menuChartTab" IsCheckable="True" IsChecked="True" Header="Chart" Click="menuChartTab_Click"/>
                            </ContextMenu>
                        </c1:C1ToolbarDropDown.Menu>
                    </c1:C1ToolbarDropDown>
                </c1:C1ToolbarGroup>
            </c1:C1ToolbarTabItem>
        </c1:C1Toolbar>
        <c1:C1DockControl x:Name="ViewDock" Grid.Row="1" ItemDockModeChanged="ViewDock_ItemDockModeChanged">
            <c1:C1DockTabControl x:Name="TabSecondary" Dock="Right" DockMode="Sliding" DockWidth="250" DockMinWidth="250" DockHeight="500" ShowSingleTab="False" UnselectedContentMode="Collapsed">
                <c1:C1DockTabItem x:Name="TabFieldList" Header="Field List">
                    <c1:C1OlapPanel x:Name="PivotBuilder" Loaded="PivotBuilder_Loaded" Margin="2"/>
                </c1:C1DockTabItem>
            </c1:C1DockTabControl>
            <c1:C1DockTabControl x:Name="TabMain" ShowSingleTab="False" DockWidth="400" DockHeight="500" UnselectedContentMode="Collapsed">
                <c1:C1DockTabItem x:Name="TabPivotGrid" Header="Pivot Grid">
                    <c1:C1OlapGrid x:Name="OlapGrid" DataSource="{Binding ElementName=PivotBuilder}" CollapsibleSubtotals="True" SelectionBackground="#FF3EB3F5" CursorBackground="#FF3EB3F5" SubtotalBackground="#FFD8F0FD" />
                </c1:C1DockTabItem>
                <c1:C1DockTabItem x:Name="TabChart" Header="Chart">
                    <c1:C1OlapChart x:Name="OlapChart" DataSource="{Binding ElementName=PivotBuilder}" >
                        
                    </c1:C1OlapChart>
                </c1:C1DockTabItem>
            </c1:C1DockTabControl>
        </c1:C1DockControl>
        <StackPanel x:Name="info" Grid.Row="1" Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Center">
            <c1:C1ProgressBar x:Name="progress" Width="250" Height="20" IsIndeterminate="True"/>
        </StackPanel>
    </Grid>
</Window>
