--- a/ui/winui/container.cpp Wed Feb 26 17:39:03 2025 +0100 +++ b/ui/winui/container.cpp Wed Feb 26 18:21:04 2025 +0100 @@ -51,6 +51,19 @@ } +UIEXPORT UIWIDGET ui_customwidget_create(UiObject *obj, ui_createwidget_func create_widget, void *userdata, UiWidgetArgs args) { + UiObject* current = uic_current_obj(obj); + + UIWIDGET widget = create_widget(obj, args, userdata); + FrameworkElement w = widget->uielement.as<FrameworkElement>(); + + UI_APPLY_LAYOUT1(current, args); + + current->container->Add(w, false); + + return widget; +} + // --------------------- UiBoxContainer --------------------- static UIWIDGET ui_box(UiObject* obj, UiContainerArgs args, UiBoxContainerType type) { @@ -873,6 +886,7 @@ } + /* * -------------------- Layout Functions -------------------- *