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
705
Error in Office2013 Style
posted

In Office2013.MSControls.Core.Implicit.xaml, there is the line:

<Style BasedOn="{StaticResource LabelStyle}" TargetType="{x:Type Label}" />

And this is being used in Office2013.xamGrid.xaml:

<Style x:Key="LabelStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />
<Setter Property="FontSize" Value="12" />
<Setter Property="FontFamily" Value="Segoe UI" />
</Style>

The Problem is, that they use different target types.

Wich one is the correct type?

  • 35319
    Verified Answer
    posted

    Hi Parthiban,

     

    Thank you for contacting Infragistics. I have been looking into your issue and every of the both files has its own style with this name. For the Office2013.MSControls.Core.Implicit.xaml it is:

     

      <Style x:Key="LabelStyle" TargetType="{x:Type Label}">

        <Setter Property="FontFamily" Value="Segoe UI" />

        <Setter Property="FontSize" Value="12" />

        <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />

        <Setter Property="IsTabStop" Value="False" />

        <Setter Property="HorizontalContentAlignment" Value="Left" />

      </Style>

     

    For the Office2013.xamGrid.xaml it is:

     

      <Style x:Key="LabelStyle" TargetType="TextBlock">

        <Setter Property="Foreground" Value="{StaticResource ForegroundBrush}" />

        <Setter Property="FontSize" Value="12" />

        <Setter Property="FontFamily" Value="Segoe UI" />

      </Style>

     

    and they actually target different elements: Label and TextBlock. The first one style targets the Microsoft Label element and the second one targets the TextBlock elements in the ColumnChooserDialog of the XamGrid.

     

    Let me know, if you need any further assistance on this matter.