<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:C1.WPF.C1Chart3D">
    <Style TargetType="local:C1Chart3D">
    <Setter Property="Background" Value="White" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1Chart3D">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
                <RowDefinition Height="Auto" />
              </Grid.RowDefinitions>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
              </Grid.ColumnDefinitions>
              <local:Chart3DView x:Name="view" Grid.Row="1" Grid.Column="1" />
              
              <ContentControl x:Name="legendContainer" 
                              HorizontalAlignment="Stretch"
                              VerticalAlignment="Stretch" 
                              HorizontalContentAlignment="Stretch"
                              VerticalContentAlignment="Stretch"
                              Grid.Row="1" Grid.Column="2" />
            </Grid>
          </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:Chart3DView">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:Chart3DView">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
            <Grid x:Name="root">
              <Canvas x:Name="canvas" />
              <!--<local:DPFCanvas x:Name="dxcanvas" Stretch="Fill" />-->
            </Grid>
          </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:C1Chart3DLegend">
    <Setter Property="HorizontalAlignment" Value="Center" />
    <Setter Property="VerticalAlignment" Value="Center" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:C1Chart3DLegend">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
            <ScrollViewer BorderThickness="0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
              <Canvas x:Name="canvas">
                <Rectangle x:Name="rectColorMap" />
              </Canvas>
            </ScrollViewer>
          </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
