DropdownList - Not show Children Item

I am a newbie to UrhoSharp. I have a problem when create UIElement-DropdownList. It only shows the first child not all three children. I workaround with the example using Urho3D: Urho3D 47_Typography
What is the problem with my code.
This is My Code in Xamarin Form:

DropDownList CreateMenu(String label, List items)
{
UIElement container = new UIElement(Context);
container.SetAlignment(HorizontalAlignment.Left, VerticalAlignment.Top);
container.SetLayout(LayoutMode.Horizontal, 8, new IntRect(20, 20, 20, 20));
Uielement.AddChild(container);

        Text text = new Text(Context);
        container.AddChild(text);
        text.Value = label;
        text.SetStyleAuto();
        text.SetFont(font: ResourceCache.GetFont("Fonts/Anonymous Pro.ttf"), size: 30);
        text.AddTag("Label1");

        list = new DropDownList(Context)
        {
            Position = new IntVector2(200, 200)
        };
        list.SetStyleAuto();
        container.AddChild(list);

        for (int i = 0; i < items.Count; i++)
        {
            Text item = new Text(Context);
            item.Value = items[i];
            item.SetColor(Urho.Color.Red);
            item.MaxWidth = (int)item.GetRowWidth(0);
            item.SetFont(font: ResourceCache.GetFont("Fonts/Anonymous Pro.ttf"), size: 30);
            item.AddTag("Content" + i.ToString());
            list.AddItem(item);
        }

        text.MaxWidth = (int)text.GetRowWidth(0);
        list.ItemSelected += ItemSelect;
        return list;
    }

void CreateUI()
{
List menu = new List() { "A", "b", "what can i do" };
CreateMenu("Menu test", menu);

    }
Sign In or Register to comment.