	  
	   
    
		


<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c="clr-namespace:System.Windows.Controls;assembly=PresentationFramework" xmlns:c1="clr-namespace:C1.WPF;assembly=C1.WPF.4" xmlns:c1chart="clr-namespace:C1.WPF.C1Chart;assembly=C1.WPF.C1Chart.4" xmlns:c1e="clr-namespace:C1.WPF.Extended;assembly=C1.WPF.Extended.4" xmlns:c1fg="http://schemas.componentone.com/winfx/2006/xaml" xmlns:local="clr-namespace:C1.WPF.Olap" xmlns:res="clr-namespace:C1.WPF.Olap.Resources" xmlns:system="clr-namespace:System;assembly=mscorlib">

    <!-- Resources -->
    
    <ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source="/C1.WPF.4;component/themes/Common.xaml" />
    </ResourceDictionary.MergedDictionaries>
    <res:Resources x:Key="Resources" />
    <local:SubtotalConverter x:Key="SubtotalConverter" />
    <local:VisibilityConverter x:Key="visibilityConverter" />

    <!-- C1OlapGrid Subtotal Background Brush -->
    <SolidColorBrush x:Key="SubtotalBackground" Color="#ffdce6fa" />
    <SolidColorBrush x:Key="IconBrush" Color="{StaticResource ForegroundTextBoxColor}"/>

    <Style TargetType="{x:Type TextBlock}" x:Key="SymbolText">
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    
    <!-- C1OlapChart -->
    <Style TargetType="local:C1OlapChart">
         <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1OlapChart">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="Root">
                            <!-- template used for C1OlapChart tooltips -->
                            <Grid.Resources>
                                <local:ToolTipConverter x:Key="ttcChart" />
                                <DataTemplate x:Key="_chartTooltip">
                                    <TextBlock Text="{Binding Converter={StaticResource ttcChart}}" />
                                </DataTemplate>
                                <local:PieChartToolTipConverter x:Key="pttcChart" />
                                <DataTemplate x:Key="_pieChartTooltip">
                                    <TextBlock Text="{Binding Converter={StaticResource pttcChart}}" />
                                </DataTemplate>
                            </Grid.Resources>
                            <!-- grid layout: title across the top, chart/legend below -->
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <!-- chart title spans both columns over grid  -->
                            <TextBlock x:Name="Title" Grid.ColumnSpan="2" FontSize="18" HorizontalAlignment="Center" />
                            <!-- chart on the left -->
                            <c1chart:C1Chart x:Name="Chart" Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
                            <!-- legend on the right -->
                            <c1chart:C1ChartLegend x:Name="Legend" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    
	<Style TargetType="c1:C1TreeView" x:Key="defaultTreeView">
	    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
	    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
	    <Setter Property="BorderThickness" Value="1" />
	    <Setter Property="BorderBrush" Value="#FFA4AFBA"></Setter>
	    <Setter Property="Template">
	        <Setter.Value>
	            <ControlTemplate TargetType="c1:C1TreeView">
	                <Grid x:Name="Root">
	                    <VisualStateManager.VisualStateGroups>
	                        <VisualStateGroup x:Name="CommonStates">
	                            <VisualState x:Name="Normal" />
	                            <VisualState x:Name="Disabled">
	                                <Storyboard>
	                                    <DoubleAnimation Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.0" />
	                                </Storyboard>
	                            </VisualState>
	                            <VisualState x:Name="MouseOver" />
	                        </VisualStateGroup>
	                        <VisualStateGroup x:Name="FocusStates">
	                            <VisualState x:Name="Unfocused" />
	                            <VisualState x:Name="Focused">
	                            </VisualState>
	                        </VisualStateGroup>
	                        <VisualStateGroup x:Name="ValidationStates">
	                            <VisualState x:Name="Valid" />
	                            <VisualState x:Name="InvalidUnfocused">
	                                <Storyboard>
	                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationDecorator" Storyboard.TargetProperty="ValidationState">
	                                        <DiscreteObjectKeyFrame KeyTime="0">
	                                            <DiscreteObjectKeyFrame.Value>
	                                                <c1:ValidationState>InvalidUnfocused</c1:ValidationState>
	                                            </DiscreteObjectKeyFrame.Value>
	                                        </DiscreteObjectKeyFrame>
	                                    </ObjectAnimationUsingKeyFrames>
	                                </Storyboard>
	                            </VisualState>
	                            <VisualState x:Name="InvalidFocused">
	                                <Storyboard>
	                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationDecorator" Storyboard.TargetProperty="ValidationState">
	                                        <DiscreteObjectKeyFrame KeyTime="0">
	                                            <DiscreteObjectKeyFrame.Value>
	                                                <c1:ValidationState>InvalidFocused</c1:ValidationState>
	                                            </DiscreteObjectKeyFrame.Value>
	                                        </DiscreteObjectKeyFrame>
	                                    </ObjectAnimationUsingKeyFrames>
	                                </Storyboard>
	                            </VisualState>
	                        </VisualStateGroup>
	                    </VisualStateManager.VisualStateGroups>
	                    <Grid x:Name="DropLine">
	                        <Path Data="M5,4 L26,4" Stretch="Fill" Height="1" Width="50" Stroke="{TemplateBinding SelectedBackground}" StrokeThickness="1" VerticalAlignment="Center" />
	                        <Path Data="M0,0 L0,14 L14,7 z" Stretch="Fill" Height="9" Width="4" HorizontalAlignment="Left" Margin="0,0,2,0" Fill="{TemplateBinding SelectedBackground}" />
	                    </Grid>
	                    <Grid x:Name="DropArrow">
	                        <Path Data="M0,0 L0,14 L14,7 z" Stretch="Fill" Height="9" Width="4" HorizontalAlignment="Right" Margin="0,0,2,0" Fill="{TemplateBinding SelectedBackground}" />
	                    </Grid>
	                <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding Background}" />
	                <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
	                        <Grid>
	                        <ScrollViewer x:Name="Scroll" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" IsTabStop="False" BorderThickness="0" Padding="{TemplateBinding Padding}" c1:ClearStyleExtensions.ScrollBarStyle="{Binding Path=ScrollBarStyle,RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" c1:ClearStyleExtensions.ButtonForeground="{TemplateBinding Foreground}" Foreground="Blue">
	                            <ItemsPresenter />
	                                <c1:ScrollViewerTouchBehavior.TouchBehavior>
	                                    <c1:ScrollViewerTouchBehavior />
	                                </c1:ScrollViewerTouchBehavior.TouchBehavior>
	                            </ScrollViewer>
	                        </Grid>
	                    </Border>
	                    <Border x:Name="DisabledVisualElement" IsHitTestVisible="False" Opacity="0" Visibility="{TemplateBinding DisabledCuesVisibility}" />
	                    <c1:C1ValidationDecorator x:Name="ValidationDecorator" Target="{Binding RelativeSource={RelativeSource TemplatedParent}}" Style="{TemplateBinding ValidationDecoratorStyle}" />
	                </Grid>
	            </ControlTemplate>
	        </Setter.Value>
	    </Setter>
	</Style>

    <!-- C1OlapPanel -->
    <Style TargetType="local:C1OlapPanel">
        <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1OlapPanel">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="Root">
                            <Grid.Resources>
                                <!-- field template for main field listbox (items with check boxes) -->
                                <DataTemplate x:Key="field">
                                    <local:DraggableItem Background="Transparent" HorizontalAlignment="Stretch">
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*" />
                                                <ColumnDefinition Width="auto" />
                                            </Grid.ColumnDefinitions>
                                            <StackPanel Orientation="Horizontal">
                                                <CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}" VerticalAlignment="Center" />
                                                <TextBlock Text="{Binding Caption}" Padding="2,0,0,0" />
                                            </StackPanel>
                                            <TextBlock Text="&#xE16E;" Grid.Column="1" Style="{StaticResource SymbolText}" Visibility="{Binding Filter.IsActive,Converter={StaticResource visibilityConverter}}"/>
                                        </Grid>
                                    </local:DraggableItem>
                                </DataTemplate>
                                <!-- field template for fields in drag/drop lists (no check boxes) -->
                                <DataTemplate x:Key="fieldActive">
                                    <local:DraggableItem Background="Transparent" HorizontalAlignment="Stretch">
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*" />
                                                <ColumnDefinition Width="auto" />
                                            </Grid.ColumnDefinitions>
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock Text="{Binding Caption}" HorizontalAlignment="Stretch" />
                                            </StackPanel>
                                            <TextBlock Text="&#xE16E;" Grid.Column="1" Style="{StaticResource SymbolText}" Visibility="{Binding Filter.IsActive,Converter={StaticResource visibilityConverter}}"/>
                                        </Grid>
                                    </local:DraggableItem>
                                </DataTemplate>
                                
								<c1:C1HierarchicalDataTemplate x:Key="cubeField" ItemsSource="{Binding SubFields}">
									<local:DraggableItem Background="Transparent" HorizontalAlignment="Stretch">
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*" />
                                                <ColumnDefinition Width="auto" />
                                            </Grid.ColumnDefinitions>
                                            <StackPanel Orientation="Horizontal">
                                                <CheckBox Margin="2" IsChecked="{Binding IsActive, Mode=TwoWay}" Visibility="{Binding CanDrag, Mode=TwoWay,Converter={StaticResource visibilityConverter}}" VerticalAlignment="Center" />
                                                <Image Source="{Binding Path=ImagePath}" Stretch="None" />
                                                <TextBlock Text="{Binding Caption}" Padding="2,0,0,0" />
                                            </StackPanel>
                                            <TextBlock Text="&#xE16E;" Grid.Column="1" Style="{StaticResource SymbolText}" Visibility="{Binding Filter.IsActive,Converter={StaticResource visibilityConverter}}"/>
                                        </Grid>
									</local:DraggableItem>
								</c1:C1HierarchicalDataTemplate>
                                <!-- field template for fields in drag/drop lists (no check boxes) -->
                                <DataTemplate x:Key="subtotalFieldActive">
                                    <local:DraggableItem Background="Transparent" HorizontalAlignment="Stretch">
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*" />
                                                <ColumnDefinition Width="auto" />
                                            </Grid.ColumnDefinitions>
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock Text="{Binding Caption}" HorizontalAlignment="Stretch" />
                                                <TextBlock Text="{Binding Subtotal, Converter={StaticResource SubtotalConverter}}" HorizontalAlignment="Stretch" />
                                            </StackPanel>
                                            <TextBlock Grid.Column="1" Text="&#xE16E;" Style="{StaticResource SymbolText}" Visibility="{Binding Filter.IsActive,Converter={StaticResource visibilityConverter}}" />
                                        </Grid>
                                    </local:DraggableItem>
                                </DataTemplate>
                                
                                <DataTemplate x:Key="cubeSubtotalFieldActive">
                                    <local:DraggableItem Background="Transparent" HorizontalAlignment="Stretch">
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*" />
                                                <ColumnDefinition Width="auto" />
                                            </Grid.ColumnDefinitions>
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock Text="{Binding Caption}" HorizontalAlignment="Stretch" />
                                            </StackPanel>
                                            <TextBlock Text="&#xE16E;" Grid.Column="1" Style="{StaticResource SymbolText}"/>
                                        </Grid> 
                                    </local:DraggableItem>
                                </DataTemplate>
                                
                            </Grid.Resources>
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <!-- main field list on top -->
                            <Grid Margin="5 5 0 0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <TextBlock Text="{Binding Path=ChooseFields, Source={StaticResource Resources}}" Padding="0 5" />
                                <ListBox x:Name="Fields" Grid.Row="1" ItemTemplate="{StaticResource field}">
                                    <ListBox.ItemContainerStyle>
                                        <Style TargetType="ListBoxItem">
                                            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                                        </Style>
                                    </ListBox.ItemContainerStyle>
                                </ListBox>
                                
                                <c1:C1TreeView x:Name="CubeFields" Grid.Row="1" ItemTemplate="{StaticResource cubeField}" IsVirtualizing="True" Visibility="Collapsed" Style="{StaticResource defaultTreeView}">
                                </c1:C1TreeView>
                            </Grid>
                            <!-- splitter in the middle -->
                            <c:GridSplitter Grid.Row="1" Height="5" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
                            <!-- drag-drop area below -->
                            <Grid Grid.Row="2" Margin="5 0 0 5">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <!-- title -->
                                <TextBlock Text="{Binding Path=DragFields, Source={StaticResource Resources}}" Grid.ColumnSpan="3" Padding="0 5" />
                                <!-- filter fields -->
                                <StackPanel Orientation="Horizontal" Grid.Row="1">
                                    <TextBlock Text="&#xE16E;" Style="{StaticResource SymbolText}" Padding="0 -2 0 2" Foreground="{TemplateBinding Foreground}"/>
                                    <TextBlock Text="{Binding Path=Filter, Source={StaticResource Resources}}" Padding="0 5"/>
                                </StackPanel>
                                <ListBox x:Name="Filter" Grid.Row="2" ItemTemplate="{StaticResource fieldActive}">
                                    <ListBox.ItemContainerStyle>
                                        <Style TargetType="ListBoxItem">
                                            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                                        </Style>
                                    </ListBox.ItemContainerStyle>
                                </ListBox>
                                <!-- column fields -->
                                <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" Margin="5 0 0 0">
                                    <Grid>
                                        <Viewbox Stretch="Uniform">
                                            <Canvas Width="16" Height="16">
                                                <Path Fill="{TemplateBinding Foreground}" Data="M 2 15 H 5 V 2 H 2 v 15 z"/>
                                                <Path Fill="{TemplateBinding Foreground}" Data="M 14 2 H 11 10 7 v 13 h 3 1 3 V 2 z m -1 7 v 2 H 11 V 9 h 2 z M 8 5 V 3 h 2 V 5 H 8 z m 3 0 V 3 h 2 V 5 H 11 z M 8 8 V 6 h 2 V 8 H 8 z m 3 0 V 6 h 2 V 8 H 11 z M 8 9 h 2 v 2 H 8 V 9 z m 0 5 v -2 h 2 v 2 H 8 z m 3 0 v -2 h 2 v 2 h -2 z"/>
                                                <Path Fill="{TemplateBinding Foreground}" Data="M 8 2 H 5 4 2 V 15 H 4 5 8 V 2 z M 7 9 v 2 H 5 V 9 H 7 z M 3 5 V 3 H 4 V 5 H 3 z M 5 5 V 3 H 7 V 5 H 5 z M 3 8 V 6 H 4 V 8 H 3 z M 5 8 V 6 H 7 V 8 H 5 z M 3 9 h 1 v 2 H 3 V 9 z m 0 5 v -2 h 1 v 2 H 3 z m 2 0 v -2 h 2 v 2 H 5 z"/>
                                            </Canvas>
                                        </Viewbox>
                                    </Grid>
                                    <TextBlock Text="{Binding Path=ColumnFields, Source={StaticResource Resources}}" Padding="0 5" />
                                </StackPanel>
                                <ListBox x:Name="Columns" Margin="5 0 0 0" Grid.Row="2" Grid.Column="1" ItemTemplate="{StaticResource fieldActive}">
                                    <ListBox.ItemContainerStyle>
                                        <Style TargetType="ListBoxItem">
                                            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                                        </Style>
                                    </ListBox.ItemContainerStyle>
                                </ListBox>
                                <!-- row fields -->
                                <StackPanel Orientation="Horizontal" Grid.Row="3">
                                    <Grid>
                                        <Viewbox Stretch="Uniform">
                                            <Canvas Width="16" Height="16">
                                                <Path Data="M 2 2 V 5 H 15 V 2 H 1 z" Fill="{TemplateBinding Foreground}"/>
                                                <Path Data="M 15 14 V 11 10 7 H 2 v 3 1 3 H 15 z M 8 13 H 6 v -2 h 2 v 2 z m 4 -5 h 2 v 2 H 12 V 8 z m 0 3 h 2 v 2 H 12 V 11 z M 9 8 h 2 v 2 H 9 V 8 z m 0 3 h 2 v 2 H 9 V 11 z M 8 8 v 2 H 6 V 8 H 8 z M 3 8 h 2 v 2 H 3 V 8 z m 0 3 h 2 v 2 H 3 v -2 z" Fill="{TemplateBinding Foreground}"/>
                                                <Path Data="M 15 8 V 5 4 2 H 2 V 4 5 8 H 15 z M 8 7 H 6 V 5 h 2 v 2 z m 4 -4 h 2 V 4 H 12 V 3 z m 0 2 h 2 V 7 H 12 V 5 z M 9 3 h 2 V 4 H 9 V 3 z m 0 2 h 2 V 7 H 9 V 5 z M 8 3 V 4 H 6 V 3 H 8 z M 3 3 H 5 V 4 H 3 V 3 z M 3 5 H 5 V 7 H 3 V 5 z" Fill="{TemplateBinding Foreground}"/>
                                            </Canvas>
                                        </Viewbox>
                                    </Grid>
                                    <TextBlock Text="{Binding Path=RowFields, Source={StaticResource Resources}}" Padding="0 5" />
                                </StackPanel>
                                <ListBox x:Name="Rows" Grid.Row="4" ItemTemplate="{StaticResource fieldActive}">
                                    <ListBox.ItemContainerStyle>
                                        <Style TargetType="ListBoxItem">
                                            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                                        </Style>
                                    </ListBox.ItemContainerStyle>
                                </ListBox>
                                <!-- value fields -->
                                <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.Column="1" Margin="5 0 0 0">
                                    <TextBlock Text="&#x2211;" FontWeight="Bold" Style="{StaticResource SymbolText}" Padding="3 -2 3 2" Foreground="{TemplateBinding Foreground}"/>
                                    <TextBlock Text="{Binding Path=Values, Source={StaticResource Resources}}" Padding="0 5"/>
                                </StackPanel>
                                <ListBox x:Name="Values" Margin="5 0 0 0" Grid.Row="4" Grid.Column="1" ItemTemplate="{StaticResource subtotalFieldActive}">
                                    <ListBox.ItemContainerStyle>
                                        <Style TargetType="ListBoxItem">
                                            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                                        </Style>
                                    </ListBox.ItemContainerStyle>
                                </ListBox>
                            </Grid>
                            <!-- 'defer updates' checkbox -->
                            
                            
              <CheckBox TextBlock.Foreground="{TemplateBinding Foreground}" Margin="5 0 5 5" Grid.Row="3" Name="_chkDeferUpdates" Content="{Binding Path=DeferUpdates, Source={StaticResource Resources}}" />
                            <!-- context menu for fields -->
                            
                            
                            <Grid.ContextMenu>
							    <ContextMenu x:Name="CtxMenu" Background="{StaticResource BaseColorBrush}">
                                    <MenuItem x:Name="CmdMoveUp" Header="{Binding Path=MoveUp, Source={StaticResource Resources}}" />
                                    <MenuItem x:Name="CmdMoveDown" Header="{Binding Path=MoveDown, Source={StaticResource Resources}}" />
                                    <MenuItem x:Name="CmdMoveToBeg" Header="{Binding Path=MoveToBeginning, Source={StaticResource Resources}}" />
                                    <MenuItem x:Name="CmdMoveToEnd" Header="{Binding Path=MoveToEnd, Source={StaticResource Resources}}" />
								    <Separator x:Name="CmdTopSeparator" />
                                    <MenuItem x:Name="CmdMoveToFilter" Header="{Binding Path=MoveToFilterFields, Source={StaticResource Resources}}">
                                        <MenuItem.Icon>
                                            <TextBlock Text="&#xE16E;" Style="{StaticResource SymbolText}" />
                                        </MenuItem.Icon>
                                    </MenuItem>
                                    <MenuItem x:Name="CmdMoveToCols" Header="{Binding Path=MoveToColumnFields, Source={StaticResource Resources}}">
                                        <MenuItem.Icon>
                                            <Grid>
                                                <Viewbox Stretch="Uniform">
                                                    <Canvas Width="16" Height="16">
                                                        <Path Fill="{StaticResource IconBrush}" Data="M 2 15 H 5 V 2 H 2 v 15 z"/>
                                                        <Path Fill="{StaticResource IconBrush}" Data="M 14 2 H 11 10 7 v 13 h 3 1 3 V 2 z m -1 7 v 2 H 11 V 9 h 2 z M 8 5 V 3 h 2 V 5 H 8 z m 3 0 V 3 h 2 V 5 H 11 z M 8 8 V 6 h 2 V 8 H 8 z m 3 0 V 6 h 2 V 8 H 11 z M 8 9 h 2 v 2 H 8 V 9 z m 0 5 v -2 h 2 v 2 H 8 z m 3 0 v -2 h 2 v 2 h -2 z"/>
                                                        <Path Fill="{StaticResource IconBrush}" Data="M 8 2 H 5 4 2 V 15 H 4 5 8 V 2 z M 7 9 v 2 H 5 V 9 H 7 z M 3 5 V 3 H 4 V 5 H 3 z M 5 5 V 3 H 7 V 5 H 5 z M 3 8 V 6 H 4 V 8 H 3 z M 5 8 V 6 H 7 V 8 H 5 z M 3 9 h 1 v 2 H 3 V 9 z m 0 5 v -2 h 1 v 2 H 3 z m 2 0 v -2 h 2 v 2 H 5 z"/>
                                                    </Canvas>
                                                </Viewbox>
                                            </Grid>
                                        </MenuItem.Icon>
                                    </MenuItem>
                                    <MenuItem x:Name="CmdMoveToRows" Header="{Binding Path=MoveToRowFields, Source={StaticResource Resources}}">
                                        <MenuItem.Icon>
                                            <Grid>
                                                <Viewbox Stretch="Uniform">
                                                    <Canvas Width="16" Height="16">
                                                        <Path Data="M 2 2 V 5 H 15 V 2 H 1 z" Fill="{StaticResource IconBrush}"/>
                                                        <Path Data="M 15 14 V 11 10 7 H 2 v 3 1 3 H 15 z M 8 13 H 6 v -2 h 2 v 2 z m 4 -5 h 2 v 2 H 12 V 8 z m 0 3 h 2 v 2 H 12 V 11 z M 9 8 h 2 v 2 H 9 V 8 z m 0 3 h 2 v 2 H 9 V 11 z M 8 8 v 2 H 6 V 8 H 8 z M 3 8 h 2 v 2 H 3 V 8 z m 0 3 h 2 v 2 H 3 v -2 z" Fill="{StaticResource IconBrush}"/>
                                                        <Path Data="M 15 8 V 5 4 2 H 2 V 4 5 8 H 15 z M 8 7 H 6 V 5 h 2 v 2 z m 4 -4 h 2 V 4 H 12 V 3 z m 0 2 h 2 V 7 H 12 V 5 z M 9 3 h 2 V 4 H 9 V 3 z m 0 2 h 2 V 7 H 9 V 5 z M 8 3 V 4 H 6 V 3 H 8 z M 3 3 H 5 V 4 H 3 V 3 z M 3 5 H 5 V 7 H 3 V 5 z" Fill="{StaticResource IconBrush}"/>
                                                    </Canvas>
                                                </Viewbox>
                                            </Grid>
                                        </MenuItem.Icon>
                                    </MenuItem>
                                    <MenuItem x:Name="CmdMoveToVals" Header="{Binding Path=MoveToValueFields, Source={StaticResource Resources}}">
                                        <MenuItem.Icon>
                                            <TextBlock Text="&#x2211;" TextAlignment="Center" Style="{StaticResource SymbolText}" FontWeight="Bold" />
                                        </MenuItem.Icon>
                                    </MenuItem>
								    <Separator />
                                    <MenuItem x:Name="CmdRemoveField" Header="{Binding Path=RemoveField, Source={StaticResource Resources}}">
                                        <MenuItem.Icon>
                                            <TextBlock Text="&#xE106;" Style="{StaticResource SymbolText}"/>
                                        </MenuItem.Icon>
                                    </MenuItem>
                                    <MenuItem x:Name="CmdFieldSettings" Header="{Binding Path=FieldSettings, Source={StaticResource Resources}}">
                                        <MenuItem.Icon>
                                            <Grid>
                                                <Viewbox Stretch="Uniform">
                                                    <Canvas Width="16" Height="16">
                                                        <Path Data="m 8 11 v 3 h 6 V 11 H 8 z m 5 2 H 9 v -1 h 4 v 1 z" Fill="{StaticResource IconBrush}"/>
                                                        <Path Data="m 4 11 v 3 H 7 V 11 H 4 z m 2 2 H 5 v -1 h 1 v 1 z" Fill="{StaticResource IconBrush}"/>
                                                        <Path Data="M 5 0 C 2.238 0 0 2.239 0 5 0 7.762 2.238 10 5 10 7.762 10 10 7.762 10 5 10 2.239 7.762 0 5 0 z M 5.845 8.5 H 4.128 V 3.75 H 5.845 V 8.5 z M 5.717 2.784 C 5.529 2.928 5.289 3 4.998 3 4.709 3 4.471 2.927 4.283 2.782 4.094 2.637 4 2.457 4 2.244 4 2.024 4.094 1.846 4.28 1.707 4.467 1.569 4.706 1.5 4.998 1.5 5.296 1.5 5.538 1.571 5.723 1.711 5.908 1.853 6 2.03 6 2.244 6 2.46 5.906 2.64 5.717 2.784 z" Fill="{StaticResource IconBrush}"/>
                                                        <Path Data="m 11 5 c 0 0.341 -0.035 0.674 -0.09 1 H 15 v 9 H 3 V 10.651 C 2.65 10.527 2.316 10.374 2 10.19 V 16 H 16 V 5 h -5 z" Fill="{StaticResource IconBrush}"/>
                                                        <Path Data="M 10.651 7 C 10.527 7.35 10.374 7.684 10.19 8 H 13 V 9 H 9.463 C 9.123 9.379 8.739 9.718 8.314 10 H 14 V 7 h -3.349 z" Fill="{StaticResource IconBrush}"/>
                                                    </Canvas>
                                                </Viewbox>
                                            </Grid>
                                        </MenuItem.Icon>
                                    </MenuItem>
                                </ContextMenu>
                            </Grid.ContextMenu>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1OlapPage -->
    <Style TargetType="local:C1OlapPage">
        <Setter Property="SubtotalBackground" Value="{StaticResource SubtotalBackground}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1OlapPage">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="Root">
                            <!-- styles used for menu items and images -->
                            <Grid.Resources>
                                <Style TargetType="Image">
                                    <Setter Property="Stretch" Value="None" />
                                    <Setter Property="Margin" Value="3" />
                                </Style>
                                <Style x:Key="menuIcon" TargetType="Image">
                                    <Setter Property="Stretch" Value="None" />
                                    <Setter Property="Margin" Value="0 3" />
                                </Style>
                            </Grid.Resources>
                            <!-- menu across the top, content below: panel, splitter, tab -->
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="5" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <!-- menu across the top -->
                            <c1:C1Menu x:Name="MainMenu" Grid.ColumnSpan="3" Height="30" AutoClose="True">
                                <!-- open/save -->
                                <c1:C1MenuItem x:Name="MenuOpen" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=LoadViewFromFile, Source={StaticResource Resources}}">
                                    <c1:C1MenuItem.Header>
                                        <Grid Width="14" Height="14">
                                            <Viewbox Stretch="Uniform">
                                                <Canvas Width="100" Height="100">
                                                    <Canvas.RenderTransform>
                                                        <TranslateTransform X="-24" Y="-10"/>
                                                    </Canvas.RenderTransform>
                                                    <Path Stroke="{StaticResource IconBrush}" StrokeThickness="7" Data="M127.913,52.8C127.351,51.999,126.434,51.523,125.457,51.523L51.835,51.523C50.571,51.523,49.443,52.314,49.014,53.502L33.696,95.828C33.364,96.746 33.501,97.77 34.061,98.57 34.623,99.371 35.54,99.847 36.517,99.847L110.138,99.847C111.401,99.847,112.529,99.056,112.959,97.868L128.276,55.542C128.61,54.624,128.474,53.6,127.913,52.8z"/>
                                                    <Path Fill="{StaticResource IconBrush}" Data="M23.802,96.72L41.985,46.48C42.844,44.104,45.1,42.522,47.628,42.522L115.847,42.522 115.847,37.022C115.847,33.709,113.16,31.022,109.847,31.022L67.202,31.022 57.286,21.105C56.16,19.979,54.635,19.347,53.043,19.347L26.463,19.347C23.15,19.347,20.463,22.034,20.463,25.347L20.463,91.347C20.462,93.705,21.825,95.738,23.802,96.72z"/>
                                                </Canvas>
                                            </Viewbox>
                                        </Grid>
                                    </c1:C1MenuItem.Header>
                                </c1:C1MenuItem>
                                <c1:C1MenuItem x:Name="MenuSave" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=SaveViewToFile, Source={StaticResource Resources}}">
                                    <c1:C1MenuItem.Header>
                                        <TextBlock Text="&#xE105;" Style="{StaticResource SymbolText}" />
                                    </c1:C1MenuItem.Header>
                                </c1:C1MenuItem>
                                <c1:C1MenuItem x:Name="MenuExport" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=Export, Source={StaticResource Resources}}">
                                    <c1:C1MenuItem.Header>
                                        <Grid Width="14" Height="14">
                                            <Viewbox Stretch="Uniform">
                                                <Canvas Width="16" Height="16">
                                                    <Canvas.RenderTransform>
                                                        <ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
                                                    </Canvas.RenderTransform>
                                                    <Path Data="m 1 4 v 9 l 9 1 V 3 L 1 4 z m 5.995 7.563 -1.357 -1.51 C 5.589 9.963 5.539 9.798 5.486 9.561 H 5.466 C 5.44 9.678 5.382 9.847 5.29 10.069 L 3.928 11.564 H 2 L 4.427 8.78 2.21 6 H 4.173 L 5.301 7.314 C 5.392 7.503 5.47 7.601 5.535 7.828 h 0.02 C 5.623 7.623 5.706 7.518 5.804 7.29 L 7.049 6 H 8.852 L 6.565 8.75 8.91 11.563 H 6.995 z" Fill="{StaticResource IconBrush}"/>
                                                    <Path Data="M 15.988 5 12 1.012 V 1 H 11 3 V 3 H 4 V 2 h 7 v 4 h 4 v 9 H 4 V 14 H 3 v 2 H 16 V 6 5 H 15.988 z M 12 5 V 2.426 L 14.574 5 H 12 z" Fill="{StaticResource IconBrush}"/>
                                                </Canvas>
                                            </Viewbox>
                                        </Grid>
                                    </c1:C1MenuItem.Header>
                                </c1:C1MenuItem>
                                <!-- spacer -->
                                <c1:C1Separator Width="4" />
                                <!-- undo/redo -->
                                <c1:C1MenuItem x:Name="MenuUndo" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=Undo, Source={StaticResource Resources}}">
                                    <c1:C1MenuItem.Header>
                                        <TextBlock Style="{StaticResource SymbolText}" Text="&#xE10E;" />
                                    </c1:C1MenuItem.Header>
                                </c1:C1MenuItem>
                                <c1:C1MenuItem x:Name="MenuRedo" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=Redo, Source={StaticResource Resources}}">
                                    <c1:C1MenuItem.Header>
                                        <TextBlock Style="{StaticResource SymbolText}" Text="&#xE10D;" />
                                    </c1:C1MenuItem.Header>
                                </c1:C1MenuItem>
                                <!-- spacer -->
                                <c1:C1Separator Width="4" />
                                <!-- customize grid -->
                                <c1:C1MenuItem x:Name="_mnuView" Padding="0 3 3 3" Header="{Binding Path=Grid, Source={StaticResource Resources}}" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=CustomizeGridView, Source={StaticResource Resources}}">
                                    <c1:C1MenuItem.Icon>
                                        <Grid Width="14" Height="14">
                                            <Viewbox Stretch="Uniform">
                                                <Canvas Width="16" Height="16">
                                                    <Path Data="m 12 2.0000003 h -1 -1.9999996 -1 -2 H 5 2 V 15 h 3 1.0000004 2 1 H 11 12 15 V 2.0000003 h -3 z m -7 4.667 v 1.333 1 V 11 12 13.417 14 H 3 V 13.417 12 11 9.0000003 v -1 -1.333 -0.667 h 2 v 0.667 z m 0 -1.667 H 3 v -2 h 2 v 2 z M 8.0000004 14 h -2 v -2 h 2 v 2 z m 0 -3 h -2 V 9.0000003 h 2 V 11 z m 0 -2.9999997 h -2 v -2 h 2 v 2 z M 11 14 H 9.0000004 V 12 H 11 v 2 z m 0 -3 H 9.0000004 V 9.0000003 H 11 V 11 z M 11 8.0000003 H 9.0000004 v -2 H 11 v 2 z M 14 14 h -2 v -2 h 2 v 2 z m 0 -3 H 12 V 9.0000003 h 2 V 11 z m 0 -2.9999997 h -2 v -2 h 2 v 2 z m 0 -3 H 13.417 12 11 9.0000004 h -1 -0.708 -1.292 v -2 h 1.292 0.708 1 H 11 12 13.417 14 v 2 z" Fill="{StaticResource IconBrush}"/>
                                                </Canvas>
                                            </Viewbox>
                                        </Grid>
                                    </c1:C1MenuItem.Icon>
                                    <c1:C1MenuItem x:Name="_mnuTotalRows" Header="{Binding Path=TotalRows, Source={StaticResource Resources}}">
                                        <c1:C1MenuItem.Icon>
                                            <Grid Width="14" Height="14" Margin="7 1 -7 1">
                                                <Viewbox Stretch="Uniform">
                                                    <Canvas Width="16" Height="16">
                                                        <Path Data="m 6 7 v 9 H 16 V 7 H 6 z m 9 8 H 7 V 8 h 8 v 7 z" Fill="{StaticResource IconBrush}"/>
                                                        <Rectangle Canvas.Left="8" Canvas.Top="10" Width="6" Height="1" Name="rect3440" Fill="{StaticResource IconBrush}"/>
                                                        <Rectangle Canvas.Left="8" Canvas.Top="12" Width="6" Height="1" Name="rect3442" Fill="{StaticResource IconBrush}"/>
                                                        <Path Data="m 5 11 0 0 v -1 l 0 0 V 9 L 5 9 V 7 L 5 7 V 6 L 5 6 V 4 H 7 V 6 H 8 V 4 h 2 v 2 h 1 V 4 h 2 v 2 h 1 V 4 3 0 H 1 v 3 1 2 1 2 1 2 H 5 V 11 z M 11 1 h 2 V 3 H 11 V 1 z M 8 1 h 2 V 3 H 8 V 1 z M 5 1 H 7 V 3 H 5 V 1 z M 4 11 H 2 v -1 h 2 v 1 z M 4 9 H 2 V 7 H 4 V 9 z M 4 6 H 2 V 4 H 4 V 6 z M 4 3 H 2 V 1 h 2 v 2 z" Fill="{StaticResource IconBrush}"/>
                                                        <Rectangle Canvas.Left="1" Canvas.Top="9" Width="4" Height="3" Fill="{StaticResource IconBrush}"/>
                                                    </Canvas>
                                                </Viewbox>
                                            </Grid>
                                        </c1:C1MenuItem.Icon>
                                        <c1:C1MenuItem x:Name="MenuTRGrand" Header="{Binding Path=GrandTotals, Source={StaticResource Resources}}" GroupName="TR" IsCheckable="True" IsChecked="True" />
                                        <c1:C1MenuItem x:Name="MenuTRSub" Header="{Binding Path=Subtotals, Source={StaticResource Resources}}" GroupName="TR" IsCheckable="True" />
                                        <c1:C1MenuItem x:Name="MenuTRNone" Header="{Binding Path=None, Source={StaticResource Resources}}" GroupName="TR" IsCheckable="True" />
                                    </c1:C1MenuItem>
                                    <c1:C1MenuItem x:Name="_mnuTotalColumns" Header="{Binding Path=TotalColumns, Source={StaticResource Resources}}">
                                        <c1:C1MenuItem.Icon>
                                            <Grid Width="14" Height="14" Margin="7 1 -7 1">
                                                <Viewbox Stretch="Uniform">
                                                    <Canvas Width="16" Height="16">
                                                        <Path Data="m 6 7 v 9 H 16 V 7 H 6 z m 9 8 H 7 V 8 h 8 v 7 z" Fill="{StaticResource IconBrush}"/>
                                                        <Rectangle Canvas.Left="8" Canvas.Top="10" Width="6" Height="1" Fill="{StaticResource IconBrush}"/>
                                                        <Rectangle Canvas.Left="8" Canvas.Top="12" Width="6" Height="1" Fill="{StaticResource IconBrush}"/>
                                                        <Path Data="M 5 13 H 4 V 11 H 5 V 10 H 4 V 8 H 5 V 7 H 4 V 5 H 6 V 6 H 7 V 5 h 2 v 1 h 1 V 5 h 1 v 1 h 1 V 5 4 1 H 0 v 3 1 2 1 2 1 3 H 5 V 13 z M 10 2 h 1 V 4 H 10 V 2 z M 7 2 H 9 V 4 H 7 V 2 z M 4 2 H 6 V 4 H 4 V 2 z M 3 13 H 1 v -2 h 2 v 2 z M 3 10 H 1 V 8 h 2 v 2 z M 3 7 H 1 V 5 H 3 V 7 z M 3 4 H 1 V 2 h 2 v 2 z" Fill="{StaticResource IconBrush}"/>
                                                        <Rectangle Canvas.Left="9" Canvas.Top="1" Width="3" Height="5" Fill="{StaticResource IconBrush}"/>
                                                    </Canvas>
                                                </Viewbox>
                                            </Grid>
                                        </c1:C1MenuItem.Icon>
                                        <c1:C1MenuItem x:Name="MenuTCGrand" Header="{Binding Path=GrandTotals, Source={StaticResource Resources}}" GroupName="TC" IsCheckable="True" IsChecked="True" />
                                        <c1:C1MenuItem x:Name="MenuTCSub" Header="{Binding Path=Subtotals, Source={StaticResource Resources}}" GroupName="TC" IsCheckable="True" />
                                        <c1:C1MenuItem x:Name="MenuTCNone" Header="{Binding Path=None, Source={StaticResource Resources}}" GroupName="TC" IsCheckable="True" />
                                    </c1:C1MenuItem>
                                    <c1:C1Separator />
                                    <c1:C1MenuItem x:Name="MenuZeros" Header="{Binding Path=ShowZeros, Source={StaticResource Resources}}" IsCheckable="True" IsChecked="True" />
                                </c1:C1MenuItem>
                                <!-- customize chart -->
                                <c1:C1MenuItem x:Name="_mnuChart" Padding="0 3 3 3" Header="{Binding Path=Chart, Source={StaticResource Resources}}" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=CustomizeChartView, Source={StaticResource Resources}}">
                                    <c1:C1MenuItem.Icon>
                                        <Grid Width="14" Height="14">
                                            <Path Data="M33.067001,30.059998 L42.667,30.059998 L42.667,40.532997 L33.067001,40.532997 z M7.4669991,20.880997 L17.066999,20.880997 L17.066999,40.532997 L7.4669991,40.532997 z M20.266998,8 L29.866997,8 L29.866997,40.533001 L20.266998,40.533001 z M2.1333332,0 C3.3115311,0 4.266674,0.95512772 4.266674,2.1333332 L4.266674,43.733265 L45.866631,43.733265 C47.044975,43.733265 48,44.68829 48,45.866631 C48,47.044975 47.044975,48 45.866631,48 L2.1333332,48 C2.0596924,48 1.9869328,47.996193 1.9152107,47.988876 C1.8434982,47.98156 1.7728329,47.97073 1.703392,47.956684 C1.6339531,47.942337 1.5657482,47.924778 1.4989433,47.903996 C1.4321384,47.883217 1.3667526,47.859219 1.3029461,47.832291 C1.2391338,47.805367 1.1769161,47.775215 1.1164589,47.742435 C1.0560036,47.709656 0.99731064,47.67395 0.94056702,47.635609 C0.88381958,47.597263 0.82901382,47.55629 0.77633667,47.512974 C0.7236557,47.469364 0.6730957,47.423412 0.62483978,47.375122 C0.57658386,47.326828 0.53062439,47.276485 0.4871521,47.223804 C0.44367599,47.17112 0.40267563,47.116093 0.36434174,47.059315 C0.32600021,47.002533 0.29032516,46.943996 0.25748444,46.883411 C0.22463989,46.82312 0.19463348,46.76078 0.16764832,46.696976 C0.14065933,46.633171 0.11668777,46.567898 0.095909119,46.500877 C0.075130463,46.434143 0.057548523,46.365952 0.04334259,46.296581 C0.029132843,46.227215 0.018295288,46.156391 0.011013031,46.084679 C0.0037307739,46.012974 0,45.940388 0,45.866631 L0,2.1333332 C0,0.95512772 0.95512772,0 2.1333332,0 z" Fill="{StaticResource IconBrush}" Stretch="Uniform"/>
                                        </Grid>
                                    </c1:C1MenuItem.Icon>
                                    <c1:C1MenuItem x:Name="MenuChartType" Header="{Binding Path=ChartType, Source={StaticResource Resources}}" />
                                    <c1:C1MenuItem x:Name="MenuPalette" Header="{Binding Path=Palette, Source={StaticResource Resources}}" />
                                    <c1:C1Separator />
                                    <c1:C1MenuItem x:Name="MenuTitle" Header="{Binding Path=ShowTitle, Source={StaticResource Resources}}" IsCheckable="True" IsChecked="True" />
                                    <c1:C1MenuItem x:Name="MenuGridlines" Header="{Binding Path=ShowGridLines, Source={StaticResource Resources}}" IsCheckable="True" IsChecked="True" />
                                    <c1:C1MenuItem x:Name="MenuStacked" Header="{Binding Path=Stacked, Source={StaticResource Resources}}" IsCheckable="True" IsChecked="True" />
                                    <c1:C1MenuItem x:Name="MenuTotalsOnly" Header="{Binding Path=TotalsOnly, Source={StaticResource Resources}}" IsCheckable="True" IsChecked="False" />
                                    <c1:C1MenuItem x:Name="MenuGroupAnno" Header="{Binding Path=GroupAnnotations, Source={StaticResource Resources}}" IsCheckable="True" IsChecked="False" />
                                </c1:C1MenuItem>
                                <!-- print -->
                                <c1:C1MenuItem x:Name="_mnuPrint" Padding="0 3 3 3" Header="{Binding Path=Report, Source={StaticResource Resources}}" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=GenerateReports, Source={StaticResource Resources}}">
                                    <c1:C1MenuItem.Icon>
                                        <TextBlock Text="&#xE160;" Style="{StaticResource SymbolText}" />
                                    </c1:C1MenuItem.Icon>
                                    <c1:C1MenuItem x:Name="MenuPrint" Header="{Binding Path=Print, Source={StaticResource Resources}}" VerticalAlignment="Center">
                                        <c1:C1MenuItem.Icon>
                                            <Grid Width="14" Height="14" Margin="6 1 -6 1">
                                                <Viewbox Stretch="Uniform">
                                                    <Canvas Width="100" Height="100">
                                                        <Path Fill="{StaticResource IconBrush}">
                                                            <Path.Data>
                                                                <EllipseGeometry RadiusX="4" RadiusY="4" Center="74.161,51.268" />
                                                            </Path.Data>
                                                        </Path>
                                                        <Path Data="M82.111,36.287L76.09,36.287C76.098,36.143,76.111,36.001,76.111,35.855L76.111,20.353C76.111,15.935,72.529,12.353,68.111,12.353L32.084,12.353C27.666,12.353,24.084,15.935,24.084,20.353L24.084,35.855C24.084,36.001,24.098,36.143,24.105,36.287L18.084,36.287C13.666,36.287,10.084,39.869,10.084,44.287L10.084,69.185C10.084,73.603,13.666,77.185,18.084,77.185L24.084,77.185 24.084,80.855C24.084,85.273,27.666,88.855,32.084,88.855L68.111,88.855C72.529,88.855,76.111,85.273,76.111,80.855L76.111,77.185 82.111,77.185C86.529,77.185,90.111,73.603,90.111,69.185L90.111,44.287C90.111,39.868,86.529,36.287,82.111,36.287z M32.084,20.353L68.111,20.353 68.111,35.855 32.084,35.855 32.084,20.353z M68.111,69.185L68.111,77.185 68.111,80.855 32.084,80.855 32.084,77.185 32.084,69.185 32.084,65.353 68.111,65.353 68.111,69.185z M82.111,69.185L76.111,69.185 76.111,58.353 68.111,58.353 32.084,58.353 24.084,58.353 24.084,69.185 18.084,69.185 18.084,44.287 82.111,44.287 82.111,69.185z" Fill="{StaticResource IconBrush}"/>
                                                    </Canvas>
                                                </Viewbox>
                                            </Grid>
                                        </c1:C1MenuItem.Icon>
                                    </c1:C1MenuItem>
                                    <c1:C1Separator />
                                    <c1:C1MenuItem x:Name="MenuPrintOptions" Header="{Binding Path=Options, Source={StaticResource Resources}}" VerticalAlignment="Center">
                                        <c1:C1MenuItem.Icon>
                                            <Grid Width="14" Height="14" Margin="6 1 -6 1">
                                                <Viewbox Stretch="Uniform">
                                                    <Canvas Width="16" Height="16">
                                                        <Path Data="M 14.988 4 11 0.012 V 0 H 10 2 V 16 H 15 V 5 4 H 14.988 z M 11 1.426 13.574 4 H 11 V 1.426 z M 14 15 H 3 V 1 h 7 v 4 h 4 v 10 z" Fill="{StaticResource IconBrush}" />
                                                        <Rectangle Canvas.Left="8" Canvas.Top="7" Width="5" Height="1" Fill="{StaticResource IconBrush}"/>
                                                        <Ellipse Canvas.Left="4" Canvas.Top="6" Width="3" Height="3" Fill="{StaticResource IconBrush}"/>
                                                        <Rectangle Canvas.Left="8" Canvas.Top="11" Width="5" Height="1" Fill="{StaticResource IconBrush}"/>
                                                        <Path Data="M 5.5 10 C 4.672 10 4 10.672 4 11.5 4 12.328 4.672 13 5.5 13 6.328 13 7 12.328 7 11.5 7 10.672 6.328 10 5.5 10 z m 0 2 C 5.224 12 5 11.775 5 11.5 5 11.223 5.224 11 5.5 11 5.776 11 6 11.223 6 11.5 6 11.775 5.776 12 5.5 12 z" Fill="{StaticResource IconBrush}"/>
                                                    </Canvas>
                                                </Viewbox>
                                            </Grid>
                                        </c1:C1MenuItem.Icon>
                                    </c1:C1MenuItem>
                                </c1:C1MenuItem>
                            </c1:C1Menu>
                            <!-- olap panel on the left -->
                            <local:C1OlapPanel x:Name="OlapPanel" Grid.Row="1" />
                            <!-- splitter in the middle -->
                            
                            
        					<c:GridSplitter Grid.Column="1" Grid.Row="1" Width="5" Background="Transparent" HorizontalAlignment="Center" VerticalAlignment="Stretch" />
                            <!-- tab control on the right -->
                            <c:TabControl x:Name="Tab" Grid.Row="1" Grid.Column="2" Margin="0 5 5 5">
                                <c:TabItem x:Name="TabGrid" Header="{Binding Path=OlapGrid, Source={StaticResource Resources}}">
                                    <local:C1OlapGrid x:Name="OlapGrid" />
                                </c:TabItem>
                                <c:TabItem x:Name="TabChart" Header="{Binding Path=OlapChart, Source={StaticResource Resources}}">
                                    <local:C1OlapChart x:Name="OlapChart" Margin="0" />
                                </c:TabItem>
                                <c:TabItem x:Name="TabRawData" Header="{Binding Path=RawData, Source={StaticResource Resources}}">
                                    <c1fg:C1FlexGrid x:Name="RawDataGrid" />
                                </c:TabItem>
                            </c:TabControl>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1FormatEditor -->
    <Style TargetType="local:C1FormatEditor">
        <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1FormatEditor">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="Root">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="150" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <!-- predefined formats -->
                            <ListBox Name="ListFormats" Margin="4" />
                            <!-- customization area -->
                            <StackPanel Grid.Column="1" Margin="4">
                                <StackPanel Orientation="Horizontal" x:Name="_pSample">
                                    <TextBlock Text="{Binding Path=Sample, Source={StaticResource Resources}}" VerticalAlignment="Center" Margin="4" />
                                    <TextBlock Name="LblSample" Text="12.000" FontWeight="Bold" Margin="4" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" x:Name="PCustom">
                                    <TextBlock Text="{Binding Path=CustomFormat, Source={StaticResource Resources}}" VerticalAlignment="Center" Margin="4" />
                                    <TextBox Name="TxtCustom" Width="80" Margin="4" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" x:Name="PDecimals">
                                    <TextBlock Text="{Binding Path=DecimalPlaces, Source={StaticResource Resources}}" VerticalAlignment="Center" Margin="4" />
                                    <c1:C1NumericBox Name="NumDec" Value="2" Format="0" Width="80" Minimum="0" Maximum="12" Margin="4" />
                                </StackPanel>
                                
                                
                <CheckBox TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="ChkThousand" Content="{Binding Path=UseThousandSeparator, Source={StaticResource Resources}}" Margin="4" />
                            </StackPanel>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1OlapFilterEditor -->
    <Style TargetType="local:C1OlapFilterEditor">
         <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1OlapFilterEditor">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="Root">
                            <Grid.Resources>
                                <!-- field template for filter items listbox (items with check boxes) -->
                                <DataTemplate x:Key="_filterItem">
                                    <CheckBox Content="{Binding Key}" IsChecked="{Binding Value, Mode=TwoWay}" />
                                </DataTemplate>
                            </Grid.Resources>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <!-- main content -->
                            
                            
                <CheckBox TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="ChkSelectAll" Content="{Binding Path=SelectAll, Source={StaticResource Resources}}" Margin="7 4" />
                            <ListBox x:Name="ListValues" Grid.Row="1" Margin="2 0" ItemTemplate="{StaticResource _filterItem}" />
                            <c1:C1Menu x:Name="ToolStrip" HorizontalAlignment="Stretch" Grid.Row="2" AutoClose="True">
                                <c1:C1MenuItem x:Name="MnuFilter" Header="{Binding Path=Filter, Source={StaticResource Resources}}" Padding="2">
                                    <c1:C1MenuItem.Icon>
                                        <TextBlock Text="&#xE16E;" Style="{StaticResource SymbolText}"/>
                                    </c1:C1MenuItem.Icon>
                                    <c1:C1MenuItem x:Name="MnuClear" Header="{Binding Path=ClearFilter, Source={StaticResource Resources}}">
                                        <c1:C1MenuItem.Icon>
                                            <Grid>
                                                <TextBlock FontFamily="Segoe UI Symbol" Text="&#xE16E;" />
                                                <TextBlock FontFamily="Segoe UI Symbol" FontSize="9" VerticalAlignment="Bottom" HorizontalAlignment="Right" Text="&#xE106;" Foreground="Red"/>
                                            </Grid>
                                        </c1:C1MenuItem.Icon>
                                    </c1:C1MenuItem>
                                    <c1:C1Separator x:Name="MnuSeparator0" />
                                    <c1:C1MenuItem x:Name="MnuEquals" Header="{Binding Path=MnuEquals, Source={StaticResource Resources}}" />
                                    <c1:C1MenuItem x:Name="MnuDoesNotEqual" Header="{Binding Path=DoesNotEqual, Source={StaticResource Resources}}" />
                                    <c1:C1Separator x:Name="MnuSeparator" />
                                    <c1:C1MenuItem x:Name="MnuBeginsWith" Header="{Binding Path=BeginsWith, Source={StaticResource Resources}}" />
                                    <c1:C1MenuItem x:Name="MnuEndsWith" Header="{Binding Path=EndsWith, Source={StaticResource Resources}}" />
                                    <c1:C1MenuItem x:Name="MnuContains" Header="{Binding Path=Contains, Source={StaticResource Resources}}" />
                                    <c1:C1MenuItem x:Name="MnuDoesNotContain" Header="{Binding Path=DoesNotContain, Source={StaticResource Resources}}" />
                                    <c1:C1Separator x:Name="MnuSeparator2" />
                                    <c1:C1MenuItem x:Name="MnuGreater" Header="{Binding Path=GreaterThan, Source={StaticResource Resources}}" />
                                    <c1:C1MenuItem x:Name="MnuGreaterOrEqual" Header="{Binding Path=GreaterThanOrEqualTo, Source={StaticResource Resources}}" />
                                    <c1:C1MenuItem x:Name="MnuLess" Header="{Binding Path=LessThan, Source={StaticResource Resources}}" />
                                    <c1:C1MenuItem x:Name="MnuLessOrEqual" Header="{Binding Path=LessThanOrEqualTo, Source={StaticResource Resources}}" />
                                    <c1:C1Separator x:Name="MnuSeparator3" />
                                    <c1:C1MenuItem x:Name="MnuBetween" Header="{Binding Path=Between, Source={StaticResource Resources}}" />
                                    <c1:C1MenuItem x:Name="_mnuCustom" Header="{Binding Path=CustomFilter, Source={StaticResource Resources}}" />
                                </c1:C1MenuItem>
                            </c1:C1Menu>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1FieldStyleEditor -->
    <Style TargetType="local:C1FieldStyleEditor">
         <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1FieldStyleEditor">
                    <Grid x:Name="Root">
                        <StackPanel Grid.Row="1" Grid.Column="1" Margin="5">
                            
                            
              <TextBlock Text="{Binding Path=Style, Source={StaticResource Resources}}" Margin="5,0,0,0" />
                            <Border BorderBrush="#FF96B9B9" BorderThickness="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="5">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="5" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="5" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="5" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="5" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="5" />
                                        <ColumnDefinition Width="5*" />
                                        <ColumnDefinition Width="10*" />
                                        <ColumnDefinition MinWidth="120" />
                                        <ColumnDefinition Width="5" />
                                    </Grid.ColumnDefinitions>
                                    
                                    
                  <CheckBox TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="BoldCheckBox" Grid.Column="3" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left" />
                  <TextBlock Foreground="{TemplateBinding Foreground}" Text="{Binding Path=Background, Source={StaticResource Resources}}" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1" />
                  <c1e:C1ColorPicker x:Name="BackgroundPicker" VerticalAlignment="Center" Grid.Column="3" Grid.Row="1" />
                  <TextBlock Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" Text="{Binding Path=Foreground, Source={StaticResource Resources}}" Grid.Column="1" Grid.Row="3" />
                  <c1e:C1ColorPicker x:Name="ForegroundPicker" VerticalAlignment="Center" Grid.Column="3" Grid.Row="3" />
                  <TextBlock Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" Text="{Binding Path=Bold, Source={StaticResource Resources}}" Grid.Column="1" Grid.Row="5" />
                                    <Button x:Name="ClearButton" VerticalAlignment="Center" Content="{Binding Path=Clear, Source={StaticResource Resources}}" Grid.Column="3" Grid.Row="5" HorizontalAlignment="Right" />
                                </Grid>
                            </Border>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1ConditionalFieldStyleEditor -->
    <Style TargetType="local:C1ConditionalFieldStyleEditor">
         <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1ConditionalFieldStyleEditor">
                    <Grid Name="Root">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <StackPanel Grid.Row="0" Margin="5">
                            
                            
              <TextBlock x:Name="AboveLabel" Foreground="{TemplateBinding Foreground}" Text="{Binding Path=ApplyToValuesAbove, Source={StaticResource Resources}}" Margin="5,0,0,0" />
              <TextBlock x:Name="BelowLabel" Foreground="{TemplateBinding Foreground}" Text="{Binding Path=ApplyToValuesBelow, Source={StaticResource Resources}}" Margin="5,0,0,0" />
                            <Border BorderBrush="#FF96B9B9" BorderThickness="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="5">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="5" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="5" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="5" />
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                        <ColumnDefinition Width="100" />
                                        <ColumnDefinition Width="5" />
                                    </Grid.ColumnDefinitions>
                                    
                                    
                  <TextBox x:Name="Threshold" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1" />
                                    <ComboBox x:Name="ConditionType" Grid.Column="3" Grid.Row="1" />
                                </Grid>
                            </Border>
                        </StackPanel>
                        <local:C1FieldStyleEditor x:Name="StyleEditor" Grid.Row="1" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1OlapFieldEditor -->
    <Style TargetType="local:C1OlapFieldEditor">
         <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1OlapFieldEditor">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="Root">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <!-- main content -->
                            <c:TabControl Name="Tab">
                                <c:TabItem Header="{Binding Path=Filter, Source={StaticResource Resources}}" Name="TabFilter">
                                    <Grid>
                                        <local:C1OlapFilterEditor x:Name="FilterEditor" />
                                    </Grid>
                                </c:TabItem>
                                <c:TabItem Header="{Binding Path=Subtotals, Source={StaticResource Resources}}" Name="TabSubtotal">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="*" />
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <ListBox x:Name="ListSubtotal" />
                                        <StackPanel Orientation="Horizontal" Grid.Row="1">
                                            
                                            
                      <TextBlock Foreground="{TemplateBinding Foreground}" Text="{Binding Path=WeighBy, Source={StaticResource Resources}}" VerticalAlignment="Center" Margin="4" />
                                            <ComboBox x:Name="CmbWeight" Width="150" Margin="4" />
                                        </StackPanel>
                                    </Grid>
                                </c:TabItem>
                                <c:TabItem Header="{Binding Path=Format, Source={StaticResource Resources}}" Name="TabFormat">
                                    <Grid>
                                        <local:C1FormatEditor x:Name="FormatEditor" />
                                    </Grid>
                                </c:TabItem>
                                <c:TabItem Header="{Binding Path=Display, Source={StaticResource Resources}}" Name="TabDisplay">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition />
                                        </Grid.RowDefinitions>
                                        <StackPanel Orientation="Vertical" Margin="5">
                                            
                                            
                      <TextBlock Foreground="{TemplateBinding Foreground}" Text="{Binding Path=Caption, Source={StaticResource Resources}}" Margin="5,0,0,0" />
                      <TextBox x:Name="CaptionBox" Foreground="{TemplateBinding Foreground}" />
                                        </StackPanel>
                                        <local:C1FieldStyleEditor x:Name="DisplayStyleEditor" Grid.Row="1" />
                                    </Grid>
                                </c:TabItem>
                                <c:TabItem Header="{Binding Path=HighValues, Source={StaticResource Resources}}" Name="TabStyleHigh">
                                    <local:C1ConditionalFieldStyleEditor x:Name="HighStyleEditor" HighValues="True" Grid.Row="1" Grid.Column="1" />
                                </c:TabItem>
                                <c:TabItem Header="{Binding Path=LowValues, Source={StaticResource Resources}}" Name="TabStyleLow">
                                    <local:C1ConditionalFieldStyleEditor x:Name="LowStyleEditor" HighValues="False" Grid.Row="1" Grid.Column="1" />
                                </c:TabItem>
                            </c:TabControl>
                            <!-- OK, Cancel buttons -->
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1">
                                <Button x:Name="BtnOk" Content="{Binding Path=OK, Source={StaticResource Resources}}" Width="75" Margin="4" />
                                <Button x:Name="BtnCancel" Content="{Binding Path=Cancel, Source={StaticResource Resources}}" Width="75" Margin="4" />
                            </StackPanel>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- CustomFilterEditor -->
    <Style TargetType="local:CustomFilterEditor">
         <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:CustomFilterEditor">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="Root">
                            <Grid.Resources>
                                <Style x:Key="fixedWidth" TargetType="Control">
                                    <Setter Property="Margin" Value="10 4" />
                                    <Setter Property="Width" Value="200" />
                                </Style>
                            </Grid.Resources>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="10" />
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="20" />
                                <RowDefinition Height="auto" />
                            </Grid.RowDefinitions>
                            
                            
              <TextBlock Text="{Binding Path=ShowItems, Source={StaticResource Resources}}" Grid.ColumnSpan="2" Margin="4" />
              <ComboBox Name="CmbOption1" Grid.Row="2" Margin="10 4" Width="200"/>
              <TextBox Name="TxtParam1" Grid.Column="1" Grid.Row="2" Style="{StaticResource fixedWidth}" />
              <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="4 0">
                <RadioButton TextBlock.Foreground="{TemplateBinding Foreground}" Name="BtnAnd" Content="{Binding Path=And, Source={StaticResource Resources}}" Margin="4" />
                <RadioButton TextBlock.Foreground="{TemplateBinding Foreground}" Name="BtnOr" Content="{Binding Path=Or, Source={StaticResource Resources}}" Margin="4" />
              </StackPanel>
                            <ComboBox Name="CmbOption2" Grid.Row="4" Margin="10 4" Width="200" />
                            <TextBox Name="TxtParam2" Grid.Column="1" Grid.Row="4" Style="{StaticResource fixedWidth}" />
                            <StackPanel Grid.Row="8" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
                                <Button Name="BtnOk" Content="{Binding Path=OK, Source={StaticResource Resources}}" Margin="4" Width="80" />
                                <Button Name="BtnCancel" Content="{Binding Path=Cancel, Source={StaticResource Resources}}" Margin="4" Width="80" />
                            </StackPanel>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1OlapMarginOptions -->
    <Style TargetType="local:C1OlapMarginOptions">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1OlapMarginOptions">
                    <Grid x:Name="Root">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="10" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="10" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <TextBlock Text="{Binding Path=Margin, Source={StaticResource Resources}}" Margin="5" />
                            <TextBlock Text="{Binding Path=Top, Source={StaticResource Resources}}" Margin="5" Grid.Column="2" />
                            <TextBlock Text="{Binding Path=Bottom, Source={StaticResource Resources}}" Margin="5" Grid.Column="2" Grid.Row="4" />
                            <TextBlock Text="{Binding Path=Left, Source={StaticResource Resources}}" Margin="5" Grid.Column="2" Grid.Row="2" />
                            <TextBlock Text="{Binding Path=Right, Source={StaticResource Resources}}" Margin="5" Grid.Column="2" Grid.Row="6" />
                            <c1:C1NumericBox HorizontalAlignment="Left" Name="TopMarginEditor" MinWidth="70" Grid.Column="2" Grid.Row="1" Value="{Binding TopMargin, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            <c1:C1NumericBox HorizontalAlignment="Left" Name="LeftMarginEditor" MinWidth="70" Grid.Column="2" Grid.Row="3" Value="{Binding LeftMargin, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            <c1:C1NumericBox HorizontalAlignment="Left" Name="BottomMarginEditor" MinWidth="70" Grid.Column="2" Grid.Row="5" Value="{Binding BottomMargin, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            <c1:C1NumericBox HorizontalAlignment="Left" Name="RightMarginEditor" MinWidth="70" Grid.Column="2" Grid.Row="7" Value="{Binding RightMargin, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        </Grid>
                        <Grid Grid.Column="2">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="10" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <TextBlock Text="{Binding Path=Padding, Source={StaticResource Resources}}" Margin="5" />
                            <TextBlock Text="{Binding Path=Top, Source={StaticResource Resources}}" Margin="5" Grid.Column="2" />
                            <TextBlock Text="{Binding Path=Bottom, Source={StaticResource Resources}}" Margin="5" Grid.Column="2" Grid.Row="4" />
                            <TextBlock Text="{Binding Path=Left, Source={StaticResource Resources}}" Margin="5" Grid.Column="2" Grid.Row="2" />
                            <TextBlock Text="{Binding Path=Right, Source={StaticResource Resources}}" Margin="5" Grid.Column="2" Grid.Row="6" />
                            <c1:C1NumericBox HorizontalAlignment="Left" Name="TopPaddingEditor" MinWidth="70" Grid.Column="2" Grid.Row="1" Value="{Binding TopPadding, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            <c1:C1NumericBox HorizontalAlignment="Left" Name="LeftPaddingEditor" MinWidth="70" Grid.Column="2" Grid.Row="3" Value="{Binding LeftPadding, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            <c1:C1NumericBox HorizontalAlignment="Left" Name="BottomPaddingEditor" MinWidth="70" Grid.Column="2" Grid.Row="5" Value="{Binding BottomPadding, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            <c1:C1NumericBox HorizontalAlignment="Left" Name="RightPaddingEditor" MinWidth="70" Grid.Column="2" Grid.Row="7" Value="{Binding RightPadding, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1OlapContentOptions -->
    <Style TargetType="local:C1OlapContentOptions">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1OlapContentOptions">
                    <Grid x:Name="Root">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        
                        
            <Border BorderBrush="#FF96B9B9" BorderThickness="1" HorizontalAlignment="Stretch" Name="border1" VerticalAlignment="Stretch" Margin="5,20" CornerRadius="5">
              <StackPanel>
                <CheckBox TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="IncludeGrid" Margin="5,25,0,0" Padding="5,0,0,0" Content="{Binding Path=IncludeInReport, Source={StaticResource Resources}}" IsChecked="{Binding IncludeGrid, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock Text="{Binding Path=Scaling, Source={StaticResource Resources}}" Margin="5,25,0,5" />
                <RadioButton TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="GridActual" Margin="5,0,0,0" Padding="5,0,0,0" GroupName="GridScaling" Content="{Binding Path=ActualSize, Source={StaticResource Resources}}" />
                <RadioButton TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="GridSingle" Margin="5,10,0,0" Padding="5,0,0,0" GroupName="GridScaling" Content="{Binding Path=FitToOnePage, Source={StaticResource Resources}}" />
                <RadioButton TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="GridWidth" Margin="5,10,0,0" Padding="5,0,0,0" GroupName="GridScaling" Content="{Binding Path=FitToPageWidth, Source={StaticResource Resources}}" />
              </StackPanel>
            </Border>
            <Border BorderBrush="#FF96B9B9" BorderThickness="1" HorizontalAlignment="Stretch" Name="border2" VerticalAlignment="Stretch" Grid.Column="1" Margin="5,20" CornerRadius="5">
              <StackPanel>
                <CheckBox TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="IncludeChart" Margin="5,25,0,0" Padding="5,0,0,0" Content="{Binding Path=IncludeInReport, Source={StaticResource Resources}}" IsChecked="{Binding IncludeChart, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock Text="{Binding Path=Scaling, Source={StaticResource Resources}}" Margin="5,25,0,5" />
                <RadioButton TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="ChartSingle" Margin="5,0,0,0" Padding="5,0,0,0" GroupName="ChartScaling" Content="{Binding Path=FitToOnePage, Source={StaticResource Resources}}" />
                <RadioButton TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="ChartWidth" Margin="5,10,0,0" Padding="5,0,0,0" GroupName="ChartScaling" Content="{Binding Path=FitToPageWidth, Source={StaticResource Resources}}" />
              </StackPanel>
            </Border>
            <Border BorderBrush="#FF96B9B9" BorderThickness="1" HorizontalAlignment="Stretch" Name="border3" VerticalAlignment="Stretch" Grid.Column="2" Margin="5,20" CornerRadius="5">
              <StackPanel>
                <CheckBox TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="IncludeRaw" Margin="5,25,0,0" Padding="5,0,0,0" Content="{Binding Path=IncludeInReport, Source={StaticResource Resources}}" IsChecked="{Binding IncludeRaw, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                <TextBlock Text="{Binding Path=Scaling, Source={StaticResource Resources}}" Margin="5,25,0,5" />
                <RadioButton TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="RawActual" Margin="5,0,0,0" Padding="5,0,0,0" GroupName="RawScaling" Content="{Binding Path=ActualSize, Source={StaticResource Resources}}" />
                <RadioButton TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="RawSingle" Margin="5,10,0,0" Padding="5,0,0,0" GroupName="RawScaling" Content="{Binding Path=FitToOnePage, Source={StaticResource Resources}}" />
                <RadioButton TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="RawWidth" Margin="5,10,0,0" Padding="5,0,0,0" GroupName="RawScaling" Content="{Binding Path=FitToPageWidth, Source={StaticResource Resources}}" />
              </StackPanel>
            </Border>
                        <TextBlock Height="23" Name="textBlock1" Text="{Binding Path=OlapGrid, Source={StaticResource Resources}}" Margin="5" Grid.ColumnSpan="2" VerticalAlignment="Top" />
                        <TextBlock Grid.ColumnSpan="2" Height="23" Name="textBlock2" Text="{Binding Path=OlapChart, Source={StaticResource Resources}}" Grid.Column="1" Margin="5" VerticalAlignment="Top" />
                        <TextBlock Grid.ColumnSpan="2" Height="23" Margin="5" Name="textBlock3" Text="{Binding Path=RawData, Source={StaticResource Resources}}" VerticalAlignment="Top" Grid.Column="2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1OlapHeaderOptions -->
    <Style TargetType="local:C1OlapHeaderOptions">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1OlapHeaderOptions">
                    <Grid x:Name="Root" Margin="5">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <TextBlock Name="textBlock1" HorizontalAlignment="Left" Grid.Row="1" Margin="5" Text="{Binding Path=Header, Source={StaticResource Resources}}" VerticalAlignment="Top" />
                        <TextBlock Name="textBlock2" HorizontalAlignment="Left" Grid.Row="3" Margin="5" Text="{Binding Path=Footer, Source={StaticResource Resources}}" VerticalAlignment="Top" />
                        <TextBox Name="HeaderLeft" Text="{Binding HeaderLeft, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="0" Grid.Row="2" Margin="5" TextWrapping="Wrap" />
                        <TextBox Name="HeaderCenter" Text="{Binding HeaderCenter, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="1" Grid.Row="2" Margin="5" TextWrapping="Wrap" />
                        <TextBox Name="HeaderRight" Text="{Binding HeaderRight, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="2" Grid.Row="2" Margin="5" TextWrapping="Wrap" />
                        <TextBox Name="FooterLeft" Text="{Binding FooterLeft, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="0" Grid.Row="4" Margin="5" TextWrapping="Wrap" />
                        <TextBox Name="FooterCenter" Text="{Binding FooterCenter, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="1" Grid.Row="4" Margin="5" TextWrapping="Wrap" />
                        <TextBox Name="FooterRight" Text="{Binding FooterRight, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="2" Grid.Row="4" Margin="5" TextWrapping="Wrap" />
                        
                        
            <CheckBox TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="HeaderSeparator" IsChecked="{Binding ShowHeaderSeparator, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Content="{Binding Path=Separator, Source={StaticResource Resources}}" Grid.Row="3" HorizontalAlignment="Left" Margin="5" Grid.Column="3" />
            <CheckBox TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="FooterSeparator" IsChecked="{Binding ShowFooterSeparator, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Content="{Binding Path=Separator, Source={StaticResource Resources}}" Grid.Row="5" HorizontalAlignment="Left" Margin="5" Grid.Column="3" />
                        <c1:C1Menu Name="PresetsMenu" Grid.ColumnSpan="3" Grid.Row="0" HorizontalAlignment="Left" Margin="5">
                            <c1:C1MenuItem x:Name="PageNumber" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=PageNumber, Source={StaticResource Resources}}">
                                <c1:C1MenuItem.Icon>
                                    <Grid>
                                        <Viewbox Stretch="Uniform">
                                            <Canvas Width="16" Height="16">
                                                <Path Data="M 14.988 8 11 4.012 V 4 H 10 5 V 16 H 15 V 9 8 H 14.988 z M 11 5.426 13.574 8 H 11 V 5.426 z M 14 15 H 6 V 5 h 4 v 4 h 4 v 6 z" Fill="{TemplateBinding Foreground}"/>
                                                <Polygon Points="4,14 4,3 11,3 11,2 4,2 3,2 3,3 3,14 " Fill="{TemplateBinding Foreground}"/>
                                                <Polygon Points="2,12 2,1 9,1 9,0 2,0 1,0 1,1 1,12 " Fill="{TemplateBinding Foreground}"/>
                                            </Canvas>
                                        </Viewbox>
                                    </Grid>
                                </c1:C1MenuItem.Icon>
                            </c1:C1MenuItem>
                            <c1:C1MenuItem x:Name="PageCount" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=TotalPageCount, Source={StaticResource Resources}}">
                                <c1:C1MenuItem.Icon>
                                    <Grid>
                                        <Viewbox Stretch="Uniform">
                                            <Canvas Width="16" Height="16">
                                                <Path Data="M 14.988 8 11 4.012 V 4 H 10 5 V 16 H 15 V 9 8 H 14.988 z M 11 5.426 13.574 8 H 11 V 5.426 z M 14 15 H 6 V 5 h 4 v 4 h 4 v 6 z" Fill="{TemplateBinding Foreground}"/>
                                                <Polygon Points="4,14 4,3 11,3 11,2 4,2 3,2 3,3 3,14 " Fill="{TemplateBinding Foreground}"/>
                                                <Polygon Points="2,12 2,1 9,1 9,0 2,0 1,0 1,1 1,12 " Fill="{TemplateBinding Foreground}"/>
                                            </Canvas>
                                        </Viewbox>
                                    </Grid>
                                </c1:C1MenuItem.Icon>
                            </c1:C1MenuItem>
                            <c1:C1Separator />
                            <c1:C1MenuItem x:Name="CurrentDate" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=CurrentDate, Source={StaticResource Resources}}">
                                <c1:C1MenuItem.Icon>
                                    <Grid>
                                        <Viewbox Stretch="Uniform">
                                            <Canvas Width="16" Height="16">
                                                <Canvas.RenderTransform>
                                                    <TranslateTransform X="1" Y="0"/>
                                                </Canvas.RenderTransform>
                                                <Path Fill="{TemplateBinding Foreground}" Data="M 11 5 H 10 8 7 5 4 1 v 10 h 3 1 2 1 2 1 3 V 5 H 11 z M 4 14 H 2 v -2 h 2 v 2 z M 4 11 H 2 V 9 h 2 v 2 z M 4 8 H 2 V 6 h 2 v 2 z m 3 6 H 5 v -2 h 2 v 2 z M 7 11 H 5 V 9 h 2 v 2 z M 7 8 H 5 V 6 h 2 v 2 z m 3 6 H 8 v -2 h 2 v 2 z m 0 -3 H 8 V 9 h 2 v 2 z M 10 8 H 8 V 6 h 2 v 2 z m 3 6 h -2 v -2 h 2 v 2 z m 0 -3 H 11 V 9 h 2 v 2 z M 13 8 H 11 V 6 h 2 v 2 z"/>
                                                <Polygon Points="3,2 1,2 1,5 14,5 14,2 12,2 12,4 9,4 9,2 6,2 6,4 3,4 " Fill="{TemplateBinding Foreground}"/>
                                                <Rectangle Canvas.Left="4" Canvas.Top="1" Width="1" Height="2" Fill="{TemplateBinding Foreground}"/>
                                                <Rectangle Canvas.Left="10" Canvas.Top="1" Width="1" Height="2" Fill="{TemplateBinding Foreground}"/>
                                                <Rectangle Canvas.Left="5" Canvas.Top="9" Width="2" Height="2" Fill="{TemplateBinding Foreground}"/>
                                            </Canvas>
                                        </Viewbox>
                                    </Grid>
                                </c1:C1MenuItem.Icon>
                            </c1:C1MenuItem>
                            <c1:C1MenuItem x:Name="CurrentTime" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=CurrentTime, Source={StaticResource Resources}}">
                                <c1:C1MenuItem.Icon>
                                    <TextBlock Text="&#xE2AD;" Style="{StaticResource SymbolText}" Foreground="{TemplateBinding Foreground}"/>
                                </c1:C1MenuItem.Icon>
                            </c1:C1MenuItem>
                            <c1:C1Separator />
                            <c1:C1MenuItem x:Name="Title" VerticalAlignment="Center" ToolTipService.ToolTip="{Binding Path=Title, Source={StaticResource Resources}}">
                                <c1:C1MenuItem.Icon>
                                    <Grid>
                                        <Viewbox Stretch="Uniform">
                                            <Canvas Width="16" Height="16">
                                                <Canvas.RenderTransform>
                                                    <TranslateTransform X="0" Y="1"/>
                                                </Canvas.RenderTransform>
                                                <Path Data="M 10.5 10 C 9.93 10 9.991 9.877 9.5 9.661 L 7 15 10.5 13 14 15 11.5 9.661 C 11.009 9.877 11.07 10 10.5 10 z" Fill="{TemplateBinding Foreground}"/>
                                                <Rectangle Canvas.Left="2" Canvas.Top="2" Width="12" Height="2" Fill="{TemplateBinding Foreground}"/>
                                                <Rectangle Canvas.Left="2" Canvas.Top="6" Width="4" Height="1" Fill="{TemplateBinding Foreground}"/>
                                                <Rectangle Canvas.Left="2" Canvas.Top="8" Width="4" Height="1" Fill="{TemplateBinding Foreground}"/>
                                                <Path Data="m 10.5 5 c -1.657 0 -3 1.344 -3 3 0 1.657 1.343 3 3 3 1.657 0 3 -1.343 3 -3 0 -1.656 -1.343 -3 -3 -3 z m 0 4.5 C 9.672 9.5 9 8.829 9 7.999 9 7.171 9.672 6.5 10.5 6.5 11.327 6.5 12 7.171 12 7.999 12 8.829 11.327 9.5 10.5 9.5 z" Fill="{TemplateBinding Foreground}"/>
                                                <Polygon Points="1,11 1,1 15,1 15,11 13.5,11 14,12 16,12 16,0 0,0 0,12 7,12 7.5,11 " FillRule="NonZero" Fill="{TemplateBinding Foreground}"/>
                                            </Canvas>
                                        </Viewbox>
                                    </Grid>
                                </c1:C1MenuItem.Icon>
                            </c1:C1MenuItem>
                        </c1:C1Menu>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- C1OlapReportOptions -->
    <Style TargetType="local:C1OlapReportOptions">
         <Setter Property="Foreground" Value="{StaticResource ForegroundTextBoxBrushColor}" />
        <Setter Property="BottomMargin" Value="2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1OlapReportOptions">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="Root">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <!-- main content -->
                            <c:TabControl Name="Tab">
                                <c:TabItem Header="{Binding Path=Page, Source={StaticResource Resources}}" Name="TabPage">
                                    <local:C1OlapMarginOptions x:Name="MarginOptions" Foreground="{TemplateBinding Foreground}" LeftMargin="{Binding LeftMargin, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" TopMargin="{Binding TopMargin, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" BottomMargin="{Binding BottomMargin, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" RightMargin="{Binding RightMargin, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" LeftPadding="{Binding LeftPadding, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" TopPadding="{Binding TopPadding, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" BottomPadding="{Binding BottomPadding, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" RightPadding="{Binding RightPadding, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                                </c:TabItem>
                                <c:TabItem Header="{Binding Path=HeaderFooter, Source={StaticResource Resources}}" Name="TabHeader">
                                    <local:C1OlapHeaderOptions x:Name="HeaderOptions" Foreground="{TemplateBinding Foreground}" HeaderLeft="{Binding HeaderLeft, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" HeaderCenter="{Binding HeaderCenter, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" HeaderRight="{Binding HeaderRight, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" FooterLeft="{Binding FooterLeft, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" FooterCenter="{Binding FooterCenter, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" FooterRight="{Binding FooterRight, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ShowHeaderSeparator="{Binding ShowHeaderSeparator, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ShowFooterSeparator="{Binding ShowFooterSeparator, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                                </c:TabItem>
                                <c:TabItem Header="{Binding Path=ReportContent, Source={StaticResource Resources}}" Name="TabContent">
                                    <local:C1OlapContentOptions x:Name="ContentOptions" Foreground="{TemplateBinding Foreground}" IncludeGrid="{Binding IncludeGrid, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IncludeChart="{Binding IncludeChart, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IncludeRaw="{Binding IncludeRaw, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" GridScale="{Binding GridScale, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ChartScale="{Binding ChartScale, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" RawScale="{Binding RawScale, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                                </c:TabItem>
                            </c:TabControl>
                            <!-- OK, Cancel buttons -->
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1">
                                <Button x:Name="BtnOk" Content="{Binding Path=OK, Source={StaticResource Resources}}" Width="75" Margin="4" />
                                <Button x:Name="BtnCancel" Content="{Binding Path=Cancel, Source={StaticResource Resources}}" Width="75" Margin="4" />
                            </StackPanel>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- PrintPageTemplate -->
    <Style TargetType="local:PrintPageTemplate">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:PrintPageTemplate">
                    <Grid x:Name="Root">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="96" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="96" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="96" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="96" />
                        </Grid.ColumnDefinitions>
                        <!-- header -->
                        <Border x:Name="HeaderSeparator" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="0 12" BorderBrush="Black" BorderThickness="0 0 0 1" />
                        <Grid Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="0 12">
                            <TextBlock x:Name="HeaderLeft" Text="{TemplateBinding HeaderLeft}" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
                            <TextBlock x:Name="HeaderCenter" Text="{TemplateBinding HeaderCenter}" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
                            <TextBlock x:Name="HeaderRight" Text="{TemplateBinding HeaderRight}" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
                        </Grid>
                        <!-- footer -->
                        <Border x:Name="FooterSeparator" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0 12" BorderBrush="Black" BorderThickness="0 1 0 0" />
                        <Grid Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0 12">
                            <TextBlock x:Name="FooterLeft" Text="{TemplateBinding FooterLeft}" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
                            <TextBlock x:Name="FooterCenter" Text="{TemplateBinding FooterCenter}" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
                            <TextBlock x:Name="FooterRight" Text="{TemplateBinding FooterRight}" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
                        </Grid>
                        <Grid x:Name="PaddingGrid" Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Left">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="0" />
                                <RowDefinition Height="*" />
                                <RowDefinition Height="0" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="0" />
                            </Grid.ColumnDefinitions>
                            
                            
        					<Viewbox x:Name="ContentBox" Grid.Row="1" Grid.Column="1" Stretch="{TemplateBinding Stretch}">
								<ContentPresenter></ContentPresenter>
							</Viewbox>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>