Sequence contains no elements error

Ive got this panel:

<Panel ux:Class="DropdownSelectedItem" ux:Name="self" Height="40" >
    <object ux:Property="Text" />
    <Brush ux:Property="BackgroundColor" />
    <Brush ux:Property="BorderColor" />
    <Text Alignment="CenterLeft" Value="{Property self.Text}" />
    <Panel Layer="Background">
        <Rectangle Layer="Background" Fill="{Property self.BackgroundColor}" Height="100%" Alignment="Top">
            <!--Stroke Brush="{Property self.BorderColor}" Width="1" /-->
        </Rectangle>
    </Panel>
</Panel>

Which I then use here in my UX:

<Panel Width="200" Height="40">
        <Rectangle Fill="{Property menu.BackgroundColor}">
            <Stroke Brush="{Property menu.BorderColor}" Width="1" />
        </Rectangle>
        <DropdownSelectedItem Text="{selected}" BackgroundColor="{Property menu.BackgroundColor}" BorderColor="{Property menu.BorderColor}" />
        <Clicked>
            <Toggle Target="expandDropdown" />
        </Clicked>
        etc....

When I preview it doesn’t display and I get a sequence contains no elements error.

If you want me to post the whole monitor log I will but it’s pretty big…

Hi, I’m unable to reproduce the issue. Any chance you could make a small self-contained reproduction?

Yeah sure. I’ve changed the code since then and got around it. I think it was because my Text property for the DropdownSelectedItem was of the type object. I changed it to <string ux:Property="Text" and it seemed to work fine. :slight_smile: