We've extended the RadCartesianChart to add custom features and behaviors. Adding a title bar (a WPF Label) to a new row above the re-templated ChartView seems to push it slightly beyond the boundaries of the containing element. How do I get the chart to fit into a smaller area within the template?
Thanks!
Thanks!
<ControlTemplate> <Grid Name="ParentGrid" > <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Label Grid.Row="0" Name="TitleBar" Background="WhiteSmoke" VerticalAlignment="Top" HorizontalContentAlignment="Center" Content="{Binding Title, RelativeSource={RelativeSource Mode=TemplatedParent}}"/> <!--CartesianChart template--> <Border Grid.Row="1" x:Name="layoutRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"> <Grid> <ContentPresenter x:Name="emptyContent" ContentTemplate="{TemplateBinding EmptyContentTemplate}" Content="{TemplateBinding EmptyContent}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> <Canvas x:Name="adornerContainer" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Canvas x:Name="labelContainer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Canvas x:Name="renderSurface" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Border x:Name="plotAreaDecoration" Style="{TemplateBinding PlotAreaStyle}"/> </Canvas> </Canvas> </Canvas> </Grid> </Border> </Grid></ControlTemplate>