Couldn't bind 'Active' property of a stateGroup to a ux:Property

Hello everyone,

Could you take a look at the following code

<Panel ux:Class="Checkbox" HitTestMode="LocalBounds">
    <string ux:Property="Label" />
    <string ux:Property="State" />

    <UserEvent Name="ClickingEvent"/>
    <OnUserEvent Name="ClickingEvent" Handler="{ClickCheckbox}" />

    <Clicked>
        <RaiseUserEvent Name="ClickingEvent">
            <UserEventArg Name="label" StringValue="{Property this.Label}" />
            <UserEventArg Name="state" StringValue= "{Property this.State}" />
        </RaiseUserEvent>
    </Clicked>

    <Font File="fontawesome-webfont.ttf" ux:Global="fa_icons" />
    <Rectangle Width="20" Height="20" CornerRadius="3" >
            <LinearGradient StartPoint="0,0" EndPoint="0,1">
                <GradientStop Offset="0" Color="#f0f0f0" />
                <GradientStop Offset="1" Color="#e0e0e0" />
            </LinearGradient>
            <Text ux:Name="checkbox" Font="fa_icons" Alignment="Center" TextAlignment="Center"/>
    </Rectangle>

    <StateGroup ux:Name="stateGroup" Active="{Property this.State}">
        <State ux:Name="trueState" >
            <Change checkbox.Value="&#xf00c;"/>
        </State>
        <State ux:Name="falseState" >
        </State>
    </StateGroup>
</Panel>

Here, I need to make this class so I can later create different checkboxes inside Each statement with different states. But the problem is that I couldn’t bind the Active property of the stateGroup to a ux:Property. It returns No sequence element’ Error.

What do you suggest me to do?

Hi!

Sorry for the later reply.

The error message is horrible (we’ll look into that), but I think the problem here is that your State property must be of type State, not string:

 <State ux:Property="State" />