<Window x:Class="FlexCommonTasks.MainWindow"
        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:local="clr-namespace:FlexCommonTasks"
        xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
        mc:Ignorable="d"
        Title="MainWindow"
        WindowState="Maximized"
        Height="600"
        Width="1100"
        Loaded="Window_Loaded"
        >

    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.New" CanExecute="ShowReport_CanExecute" Executed="ShowReport_Executed" />
    </Window.CommandBindings>
    
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <ScrollViewer>
            <ItemsControl x:Name="icReports">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <c1:C1Expander Header="{Binding CategoryName}" IsExpanded="True" Margin="3" BorderThickness="1">
                            <ItemsControl ItemsSource="{Binding Reports}" Margin="10, 0, 0, 0">
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Margin="0, 2, 0, 2">
                                            <Hyperlink Command="ApplicationCommands.New" CommandParameter="{Binding}">
                                                <TextBlock Text="{Binding}"/>                                               
                                            </Hyperlink>
                                        </TextBlock>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                        </c1:C1Expander>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </ScrollViewer>

        <c1:C1FlexViewer
            x:Name="fv"
            BackwardForwardVisible="True"
            Grid.Column="1"
            />

    </Grid>
</Window>
