Build fails in 0.9.8.5700: ux:Property can not specify ux:Value

Hi,

just upgraded to 0.9.8.5700 and can not run the project anymore. It was running just before the upgrade and no changes have been done to the project.

The source of the issue seems to be this part:

<Panel ux:Class="MyButton" ux:Name="self">
      <string ux:Property="Text" ux:Value="MyButton" />
      <float4 ux:Property="CornerRadius" ux:Value="0" />
      <float4 ux:Property="BackgroundColor" ux:Value="#f00" />
      <float4 ux:Property="TextColor" ux:Value="#000" />
      <Text Alignment="Center" FontSize="20" TextColor="{Property self.TextColor}" Value="{Property self.Text}"/>
      <Rectangle Layer="Background" CornerRadius="{Property self.CornerRadius}">
          <SolidColor Color="{Property self.BackgroundColor}"/>
      </Rectangle>
</Panel>

It gives this error: E8001: Nodes marked with ux:Property can not specify ux:Value. To assign a default value to ‘TextColor’, put ‘TextColor="#000"’ on the containing class node.

If you need more I can of course provide the whole project.

Hi!

This was a change in 0.9.8.

Default values for ux:Property are no longer specified as ux:Value, but by setting the properties directly on the owning class:

<Panel ux:Class="MyButton" ux:Name="self" Text="MyButton" BackgroundColor="#f00">
    <string ux:Property="Text" />
    <float4 ux:Property="CornerRadius" />
    <float4 ux:Property="BackgroundColor" />
    <float4 ux:Property="TextColor"/>
    <Text Alignment="Center" FontSize="20" TextColor="{Property self.TextColor}" Value="{Property self.Text}"/>
    <Rectangle Layer="Background" CornerRadius="{Property self.CornerRadius}">
      <SolidColor Color="{Property self.BackgroundColor}"/>
    </Rectangle>
</Panel>

Note that you don’t need to set a default value if the value is zero.

mbefore305: take a look at the changelog which covers this change at great length :slight_smile:

Ah, sorry. I read the changelog, but somehow missed that one.