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
130
Multiple measures - how to translate label?
posted

How can I translate label created for "measures group"?

  • 7922
    Verified Answer
    posted

    Hi

    You can retemplate the FieldItemControl in Blend and set the string you want.

    Your template should be something like below:

    <!--FieldItemControl-->
    <Style TargetType="igPivotPrim:FieldItemControl" x:Key="DisableFilteringKey">
            <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="igPivotPrim:FieldItemControl">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2">
                        <VisualStateManager.VisualStateGroups>                        <VisualStateGroup x:Name="MeasureStates">
                                <VisualState x:Name="AllVisible"/>
                                <VisualState x:Name="Hidden">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="measureText" Storyboard.TargetProperty="Opacity" To="1"/>
                                        <DoubleAnimation Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
     
                        <Grid x:Name="Root" Background="Transparent">
                            <StackPanel Orientation="Horizontal">
                                   <Border BorderBrush="DarkGray" BorderThickness="0" Background="Transparent">
                                    <Grid>
                                    <TextBlock Text="My Measures string" Opacity="0" Name="measureText" VerticalAlignment="Center" Margin="3, 0, 3,0"/>
      
                                    <ContentPresenter Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                                    </Grid>
                                </Border>
                                .........
                            </StackPanel>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>