'Case' of 'Match and Case' does not work with databinding

Hi there,

given a scenario of having a stream of messages from different users, i tried to use Match and Case to give the own messages a different background color. This is a overly simplified test case that reproduces the problem.

Expected behaviour: A blue rectangle should show up, as myUserID matches postUserID.
Actual behaviour: Preview throws a NullReferenceException (see error message at the end of this post)

<App Theme="Basic">

    <Panel>

        <JavaScript>

            var myUserID         = "CFC4CF30-B042-472D-B73D-7AC1D08A97DD";
            var postUserID         = "CFC4CF30-B042-472D-B73D-7AC1D08A97DD";


            module.exports = 
            {
                myUserID     : myUserID,
                postUserID     : postUserID,
            }

        </JavaScript>


        <StackPanel Orientation="Vertical">

            <Match Value="{postUserID}">

                <Case String="{myUserID}">
                    <Rectangle Width="100" Height="100" Background="#0000cc"/>
                </Case>

                <Case IsDefault="true" String="otherID">
                    <Rectangle Width="100" Height="100" Background="#cc0000"/>
                </Case>

            </Match>

        </StackPanel>

    </Panel>

</App>

This is the error i got in the monitor:

Preview detected an unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object

Hi!

Sorry for the very late reply, we somehow missd this.

I’ve filed an issue for this internally and it will be looked at.

Thanks for reporting!