<Application
    x:Class="FlexReportExplorer.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:FlexReportExplorer"
    xmlns:c1="using:C1.Xaml"
    xmlns:fv="using:C1.Xaml.FlexViewer"
    RequestedTheme="Light"
    >
    <Application.Resources>
        <ResourceDictionary>

            <local:Strings x:Key="FlexReportExplorerLocalization" />

            <Style x:Key="PageTitleTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource BodyTextBlockStyle}">
                <Setter Property="FontWeight" Value="SemiBold"/>
                <Setter Property="TextWrapping" Value="NoWrap"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="Margin" Value="12, 0, 4, 0"/>
            </Style>

            <local:CustomTemplateSelector x:Key="TemplateSelector">
                <local:CustomTemplateSelector.Resources>
                    <ResourceDictionary>

                        <c1:C1HierarchicalDataTemplate x:Key="CategoryTemplate" ItemsSource="{Binding Reports}">
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Height="50">
                                    <Image
                                        Source="{Binding ImageUri}"
                                        Width="24"
                                        Height="24"
                                        Margin="3,3,3,3"
                                        Stretch="Fill"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        />
                                    <TextBlock
                                        Text="{Binding Text}"
                                        FontSize="14"
                                        FontFamily="Calibri"
                                        Foreground="Gray"
                                        TextWrapping="Wrap"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        Margin="10,0,20,0"
                                        />
                                </StackPanel>
                            </DataTemplate>
                        </c1:C1HierarchicalDataTemplate>

                        <c1:C1HierarchicalDataTemplate x:Key="CategorySeparatorTemplate">
                            <DataTemplate>
                                <Image
                                    Source="Assets/Separator.png"
                                    Stretch="Fill"
                                    Height="25"
                                    Width="280"
                                    />
                            </DataTemplate>
                        </c1:C1HierarchicalDataTemplate>

                        <c1:C1HierarchicalDataTemplate x:Key="ReportTemplate">
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Image
                                        Source="{Binding ImageUri}"
                                        Width="100"
                                        Height="100"
                                        Margin="3,3,0,3"
                                        Stretch="Fill"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        />
                                    <TextBlock
                                        Text="{Binding ReportTitle}"
                                        FontSize="14"
                                        FontFamily="Calibri"
                                        Foreground="Gray"
                                        TextWrapping="Wrap"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        Margin="10,0,20,0"
                                        />
                                </StackPanel>
                            </DataTemplate>
                        </c1:C1HierarchicalDataTemplate>

                    </ResourceDictionary>
                </local:CustomTemplateSelector.Resources>
            </local:CustomTemplateSelector>

            <local:CustomStyleSelector x:Key="TemplateStyleSelector">
                <local:CustomStyleSelector.Resources>
                    <ResourceDictionary>
                        <Style x:Key="ExpandedStyle" TargetType="c1:C1TreeViewItem">
                            <Setter Property="SelectedBackground" Value="#C1E2F4"/>
                        </Style>
                    </ResourceDictionary>
                </local:CustomStyleSelector.Resources>
            </local:CustomStyleSelector>

        </ResourceDictionary>
    </Application.Resources>
</Application>
 