Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
455
Setting the Value and DataTemplate Label attribute of the CategoryXAxis Element
posted

Hi Infragistics,

How do i set the <CategoryXAxis> Elements Label Attribute's Style and Value at the Same time ?

for example:

I set the Label Property (or more correctly in Xaml terms Atrribute like below:

<CategoryAxis  Label="{ } { Key }" >

but then i also want to set the Label Template Like Below:

<CategoryAxis  Label="{StaticResource XaxisLabelTemplate" >

DataTemplate for the Label:

<DataTemplate x:Key="XAxisLabelTemplate">
        <Border Canvas.ZIndex="1" Margin="2" CornerRadius="3" Background="{StaticResource XAxisLabelBackground}" BorderThickness="1" RenderTransformOrigin="0,0" VerticalAlignment="Top" HorizontalAlignment="Left">
            <Border.RenderTransform>
                <TransformGroup>
                    <RotateTransform Angle="40" />
                    <TranslateTransform X="40"></TranslateTransform>
                </TransformGroup>
            </Border.RenderTransform>
            <TextBlock Foreground="Black" FontWeight="Bold" Margin="2" Padding="1" TextAlignment="Center" Text="{Binding Item.Label}"></TextBlock>
           </Border>
    </DataTemplate>

So my Question is how do i do Both?

What i mean  is Setting the Datatemplate and the Value for the Label attribute of the CategoryXaxis element of a StackedChart?