<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
    xmlns:fv="clr-namespace:C1.WPF.FlexViewer"
    >

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Common.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="{x:Type fv:C1FlexViewer}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type fv:C1FlexViewer}">
                    <Border x:Name="rootBorder" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
                        <Grid x:Name="layoutRoot">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition x:Name="toolColumn" Width="0" />
                                <ColumnDefinition x:Name="splitterColumn" Width="Auto" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition x:Name="toolbarRow" Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>

                            <fv:MainToolbar
                                x:Name="mainToolbar"
                                Grid.Row="0"
                                Grid.Column="0"
                                Grid.ColumnSpan="3"
                                />

                            <Frame
                                x:Name="toolFrame"
                                Grid.Row="1"
                                Grid.RowSpan="4"
                                NavigationUIVisibility="Hidden"
                                >
                            </Frame>

                            <GridSplitter
                                x:Name="splitter"
                                Grid.Row="1"
                                Grid.RowSpan="4"
                                Grid.Column="1"
                                Background="{StaticResource SplitterBackground}"
                                HorizontalAlignment="Left"
                                BorderThickness="1 0"
                                BorderBrush="{StaticResource BorderBrush}"
                                />

                            <fv:SearchToolbar
                                x:Name="searchToolbar"
                                Grid.Row="1"
                                Grid.Column="2"
                                />

                            <fv:C1FlexViewerPane
                                x:Name="fvp"
                                Grid.Row="2"
                                Grid.Column="2"
                                >
                                <fv:C1FlexViewerPane.ContextMenu>
                                    <ContextMenu x:Name="contextMenu" FontSize="{StaticResource FontSize}">
                                        <MenuItem
                                            x:Name="copyMenuItem"
                                            Header="{Binding ContextMenuCopy, Source={StaticResource Strings}}"
                                            />
                                        <MenuItem
                                            x:Name="selectToolMenuItem"
                                            IsCheckable="True"
                                            Header="{Binding ContextMenuSelectTool, Source={StaticResource Strings}}"
                                            />
                                        <MenuItem
                                            x:Name="selectAllMenuItem"
                                            Header="{Binding ContextMenuSelectAll, Source={StaticResource Strings}}"
                                            />
                                        <Separator />
                                        <MenuItem
                                            x:Name="deselectMenuItem"
                                            Header="{Binding ContextMenuDeselect, Source={StaticResource Strings}}"
                                            />
                                    </ContextMenu>
                                </fv:C1FlexViewerPane.ContextMenu>
                            </fv:C1FlexViewerPane>

                            <fv:NotificationBar
                                x:Name="statusBar"
                                Grid.Row="3"
                                Grid.Column="2"
                                />

                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
