View Issue Details

IDProjectCategoryView StatusLast Update
0004841NoesisGUIC++ SDKpublic2026-03-01 22:42
Reporterel_BA Assigned Tosfernandez  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version3.2.11 
Target Version3.2 
Summary0004841: FontWeight type name discrepancy between Noesis and WPF
Description

In WPF, the name for all of the font weight types is under "FontWeights", while in Noesis it is under "FontWeight".

<TextBlock Text="Hello World"  FontSize="99" FontFamily="{StaticResource Technor}" FontWeight="{x:Static FontWeight.Bold}" /> <!--Works in Noesis-->

<TextBlock Text="Hello World"  FontSize="99" FontFamily="{StaticResource Technor}" FontWeight="{x:Static FontWeights.Bold}" /> <!--Works in Blend-->

Thanks!

PlatformAny

Activities

sfernandez

sfernandez

2026-02-26 10:33

manager   ~0011948

Last edited: 2026-02-26 10:34

Why do you need to use x:Static instead of the string value of the enum?

<TextBlock Text="Hello World"  FontSize="99" FontFamily="{StaticResource Technor}" FontWeight="Bold" />
jsantos

jsantos

2026-02-26 13:53

manager   ~0011957

Anyway, this is a deviation we should fix, right SergIo?

sfernandez

sfernandez

2026-02-26 17:20

manager   ~0011959

Yes, we should fix it, just trying to figure out the priority in case using the plain enum value is enough.

el_BA

el_BA

2026-02-26 22:00

reporter   ~0011964

Heya, I was using x:Static for animation purposes :)

el_BA

el_BA

2026-02-26 22:56

reporter   ~0011965

Last edited: 2026-02-26 22:56

It's pretty easy to get around, but it adds quite a few lines

      <Storyboard x:Key="Storyboard0">
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextBlock0" Storyboard.TargetProperty="(TextElement.FontWeight)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static FontWeight.SemiLight}"/>
          <DiscreteObjectKeyFrame KeyTime="00:00:01" Value="{x:Static FontWeight.Black}"/>
        </ObjectAnimationUsingKeyFrames>
      </Storyboard>

vs

      <Storyboard x:Key="Storyboard0">
        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextBlock0"
                                       Storyboard.TargetProperty="(TextElement.FontWeight)">
          <DiscreteObjectKeyFrame KeyTime="00:00:00">
            <DiscreteObjectKeyFrame.Value>
              <FontWeight>
                SemiLight
              </FontWeight>
            </DiscreteObjectKeyFrame.Value>
          </DiscreteObjectKeyFrame>
          <DiscreteObjectKeyFrame KeyTime="00:00:01">
            <DiscreteObjectKeyFrame.Value>
              <FontWeight>
                Black
              </FontWeight>
            </DiscreteObjectKeyFrame.Value>
          </DiscreteObjectKeyFrame>
        </ObjectAnimationUsingKeyFrames>
      </Storyboard>
sfernandez

sfernandez

2026-02-27 10:16

manager   ~0011966

Last edited: 2026-02-27 10:17

Oh, I see your scenario. Although there is a way to simplify the xaml a lot by using resources, something like this:

<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <Grid.Resources>
    <FontWeight x:Key="FWNormal">Normal</FontWeight>
    <FontWeight x:Key="FWBold">Bold</FontWeight>
    <Storyboard x:Key="Anim">
      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="txt" Storyboard.TargetProperty="FontWeight">
        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource FWNormal}"/>
        <DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{StaticResource FWBold}"/>
        <DiscreteObjectKeyFrame KeyTime="0:0:2" Value="{StaticResource FWNormal}"/>
      </ObjectAnimationUsingKeyFrames>
    </Storyboard>
  </Grid.Resources>
  <Grid.Triggers>
    <EventTrigger RoutedEvent="Grid.Loaded">
      <BeginStoryboard Storyboard="{StaticResource Anim}"/>
    </EventTrigger>
  </Grid.Triggers>
  <TextBlock x:Name="txt" Text="Hello World" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="30"/>
</Grid>
el_BA

el_BA

2026-03-01 22:42

reporter   ~0011976

I can't believe I didn't even think of doing something like that - that's a great solution, thank you!

Issue History

Date Modified Username Field Change
2026-02-26 01:03 el_BA New Issue
2026-02-26 10:32 sfernandez Assigned To => sfernandez
2026-02-26 10:32 sfernandez Status new => assigned
2026-02-26 10:32 sfernandez Product Version => 3.2.11
2026-02-26 10:32 sfernandez Target Version => 3.2
2026-02-26 10:33 sfernandez Status assigned => feedback
2026-02-26 10:33 sfernandez Note Added: 0011948
2026-02-26 10:34 sfernandez Note Edited: 0011948
2026-02-26 13:53 jsantos Note Added: 0011957
2026-02-26 17:20 sfernandez Note Added: 0011959
2026-02-26 22:00 el_BA Note Added: 0011964
2026-02-26 22:00 el_BA Status feedback => assigned
2026-02-26 22:56 el_BA Note Added: 0011965
2026-02-26 22:56 el_BA Note Edited: 0011965
2026-02-27 10:16 sfernandez Status assigned => feedback
2026-02-27 10:16 sfernandez Note Added: 0011966
2026-02-27 10:17 sfernandez Note Edited: 0011966
2026-03-01 22:42 el_BA Note Added: 0011976
2026-03-01 22:42 el_BA Status feedback => assigned