public new void Start() { base.Start(); var root = visualTree; var popupWindow = new PopupWindow(); popupWindow.text = "New Task"; root.Add(popupWindow); m_TextField = new TextField { name = "input", viewDataKey = "input", isDelayed = true }; popupWindow.Add(m_TextField); m_TextField.RegisterCallback <KeyDownEvent>(AddTask); var button = new Button(AddTask) { text = "Save task" }; popupWindow.Add(button); var box = new Box(); m_TasksContainer = new ScrollView(); m_TasksContainer.showHorizontal = false; box.Add(m_TasksContainer); root.Add(box); }