private PopupRoot CreateTarget() { var result = new PopupRoot { Template = new FuncControlTemplate <PopupRoot>(_ => new ContentPresenter { Name = "PART_ContentPresenter", }), }; result.ApplyTemplate(); return(result); }
private PopupRoot CreateTarget(TopLevel popupParent) { var result = new PopupRoot(popupParent, popupParent.PlatformImpl.CreatePopup()) { Template = new FuncControlTemplate <PopupRoot>((parent, scope) => new ContentPresenter { Name = "PART_ContentPresenter", [!ContentPresenter.ContentProperty] = parent[!PopupRoot.ContentProperty], }.RegisterInNameScope(scope)), }; result.ApplyTemplate(); return(result); }
private PopupRoot CreateTarget() { var result = new PopupRoot { Template = new FuncControlTemplate <PopupRoot>(parent => new ContentPresenter { Name = "PART_ContentPresenter", [!ContentPresenter.ContentProperty] = parent[!PopupRoot.ContentProperty], }), }; result.ApplyTemplate(); return(result); }