internal override void OnDispose() { base.OnDispose(); Toolbar?.OnDispose(); Taskpad?.OnDispose(); Pager?.OnDispose(); }
public override void OnDispose() { base.OnDispose(); Toolbar?.OnDispose(); Taskpad?.OnDispose(); Pager?.OnDispose(); CollectionView?.OnDispose(); }
public override void OnSetStyles() { base.OnSetStyles(); Toolbar?.OnSetStyles(); Taskpad?.OnSetStyles(); Pager?.OnSetStyles(); CollectionView?.OnSetStyles(); }
protected override void OnEndInit() { base.OnEndInit(); Toolbar?.SetParent(this); Taskpad?.SetParent(this); Pager?.SetParent(this); CollectionView?.SetParent(this); }
internal override void RenderElement(RenderContext context, Action <TagBuilder> onRender = null) { var dialog = new TagBuilder("div", "modal"); dialog.MergeAttribute("id", context.RootId); dialog.MergeAttribute("v-cloak", String.Empty); dialog.AddCssClassBoolNo(UserSelect, "user-select"); dialog.MergeAttribute("data-controller-attr", GetControllerAttributes()); SetSize(dialog); dialog.RenderStart(context); RenderHeader(context); RenderLoadIndicator(context); var content = new TagBuilder("div", "modal-content"); OnCreateContent(content); if (Height != null) { content.MergeStyle("min-height", Height.Value); } if (Padding != null) { Padding.MergeStyles("padding", content); } content.AddCssClassBool(IsContentIsIFrame, "content-iframe"); // bug fix (3px height) content.RenderStart(context); if (Taskpad != null) { var grid = new TagBuilder("div", "dialog-grid"); if (Taskpad is Taskpad tp && tp.Width != null) { grid.MergeStyle("grid-template-columns", $"1fr {tp.Width.Value}"); } grid.RenderStart(context); var gridContent = new TagBuilder("div", "dialog-grid-content"); gridContent.RenderStart(context); RenderChildren(context); gridContent.RenderEnd(context); Taskpad.RenderElement(context); grid.RenderEnd(context); } else { RenderChildren(context); } content.RenderEnd(context); RenderFooter(context); dialog.RenderEnd(context); }
public override void RenderElement(RenderContext context, Action <TagBuilder> onRender = null) { if (SkipRender(context)) { return; } TagBuilder page = null; Boolean isGridPage = (Toolbar != null) || (Taskpad != null) || (Pager != null); // render page OR colleciton view void addGridAction(TagBuilder tag) { if (!isGridPage) { return; } tag.AddCssClass("page-grid"); if (Taskpad != null) { if (Taskpad is Taskpad tp && tp.Width != null) { if (tp.Position == TaskpadPosition.Left) { tag.AddCssClass("taskpad-left"); tag.MergeStyle("grid-template-columns", $"{tp.Width.Value} 1fr"); } else { tag.MergeStyle("grid-template-columns", $"1fr {tp.Width.Value}"); } } } } if (CollectionView != null) { CollectionView.RenderStart(context, (tag) => { tag.AddCssClass("page").AddCssClass("absolute"); addGridAction(tag); AddAttributes(tag); tag.MergeAttribute("id", context.RootId); }); } else { page = new TagBuilder("div", "page absolute"); page.MergeAttribute("id", context.RootId); addGridAction(page); AddAttributes(page); if (!isGridPage) { MergeAttributes(page, context, MergeAttrMode.Margin); } if (PrintPage != null) { page.AddCssClass("print-target"); page.AddCssClass(PrintPage.Orientation.ToString().ToLowerInvariant()); page.MergeAttribute("v-print-page", PrintPage.ToJson()); } page.RenderStart(context); } RenderTitle(context); if (isGridPage) { Toolbar?.RenderElement(context, (tag) => tag.AddCssClass("page-toolbar")); Taskpad?.RenderElement(context, (tag) => tag.AddCssClass("page-taskpad")); Pager?.RenderElement(context, (tag) => tag.AddCssClass("page-pager")); var content = new TagBuilder("div", "page-content"); if (ChildHasWrapper) { content.AddCssClass("with-wrapper"); } MergeAttributes(content, context, MergeAttrMode.Margin); content.RenderStart(context); RenderChildren(context); content.RenderEnd(context); } else { RenderChildren(context); } var outer = new TagBuilder("div", "page-canvas-outer").RenderStart(context); new TagBuilder("div", "page-canvas").MergeAttribute("id", "page-canvas").Render(context); outer.RenderEnd(context); RenderContextMenus(); RenderAccelCommands(context); if (CollectionView != null) { CollectionView.RenderEnd(context); } else { if (page == null) { throw new InvalidProgramException(); } page.RenderEnd(context); } }
public override void RenderElement(RenderContext context, Action <TagBuilder> onRender = null) { var dialog = new TagBuilder("div", "modal"); dialog.MergeAttribute("id", context.RootId); dialog.MergeAttribute("v-cloak", String.Empty); dialog.AddCssClassBoolNo(UserSelect, "user-select"); dialog.MergeAttribute("data-controller-attr", GetControllerAttributes()); if (!String.IsNullOrEmpty(TestId) && context.IsDebugConfiguration) { dialog.MergeAttribute("test-id", TestId); } SetSize(dialog); dialog.RenderStart(context); if (ShowWaitCursor) { new TagBuilder("wait-cursor", "dialog") .MergeAttribute(":ready", "$data.$ready") .Render(context, TagRenderMode.Normal); } RenderHeader(context); RenderLoadIndicator(context); var content = new TagBuilder("div", "modal-content"); OnCreateContent(content); if (Height != null) { content.MergeStyle("min-height", Height.Value); } if (Padding != null) { Padding.MergeStyles("padding", content); } content.AddCssClassBool(IsContentIsIFrame, "content-iframe"); // bug fix (3px height) content.RenderStart(context); if (Taskpad != null) { var grid = new TagBuilder("div", "dialog-grid"); if (Taskpad is Taskpad tp && tp.Width != null) { grid.MergeStyle("grid-template-columns", $"1fr {tp.Width.Value}"); } grid.RenderStart(context); var gridContent = new TagBuilder("div", "dialog-grid-content"); gridContent.RenderStart(context); RenderChildren(context); gridContent.RenderEnd(context); Taskpad.RenderElement(context); grid.RenderEnd(context); } else { RenderChildren(context); } content.RenderEnd(context); RenderFooter(context); dialog.RenderEnd(context); }
public override void RenderElement(RenderContext context, Action <TagBuilder> onRender = null) { var dialog = new TagBuilder("div", "modal"); dialog.MergeAttribute("id", context.RootId); dialog.MergeAttribute("v-cloak", String.Empty); dialog.AddCssClassBoolNo(UserSelect, "user-select"); dialog.MergeAttribute("data-controller-attr", GetControllerAttributes()); dialog.AddCssClassBool(Maximize, "maximize"); dialog.AddCssClassBool(ButtonOnTop, "button-on-top"); if (!String.IsNullOrEmpty(TestId) && context.IsDebugConfiguration) { dialog.MergeAttribute("test-id", TestId); } if (Maximize) { dialog.MergeAttribute("v-maximize", "true"); } else { SetSize(dialog); } dialog.RenderStart(context); if (ShowWaitCursor) { new TagBuilder("wait-cursor", "dialog") .MergeAttribute(":ready", "$data.$ready") .Render(context, TagRenderMode.Normal); } if (CollectionView != null) { CollectionView.RenderStart(context, tag => { tag.AddCssClass("cw-dialog"); }); } RenderHeader(context); RenderLoadIndicator(context); var content = new TagBuilder("div", "modal-content"); OnCreateContent(content); if (Height != null) { content.MergeStyle("min-height", Height.Value); } if (Padding != null) { Padding.MergeStyles("padding", content); } content.AddCssClassBool(IsContentIsIFrame, "content-iframe"); // bug fix (3px height) if (Background != BackgroundStyle.Default) { content.AddCssClass("background-" + Background.ToString().ToKebabCase()); } content.AddCssClassBool(Overflow, "overflow"); content.RenderStart(context); if (Taskpad != null) { var gridContent = new TagBuilder("div", "dialog-grid-content"); var grid = new TagBuilder("div", "dialog-grid"); if (Taskpad is Taskpad tp && tp.Width != null) { if (tp.Position == TaskpadPosition.Left) { grid.MergeStyle("grid-template-columns", $"{tp.Width.Value} 1fr"); gridContent.MergeStyle("grid-column", "2"); } else { grid.MergeStyle("grid-template-columns", $"1fr {tp.Width.Value}"); gridContent.MergeStyle("grid-column", "1"); } } grid.RenderStart(context); gridContent.RenderStart(context); RenderChildren(context); gridContent.RenderEnd(context); Taskpad.RenderElement(context); grid.RenderEnd(context); } else { RenderChildren(context); } content.RenderEnd(context); RenderFooter(context); if (CollectionView != null) { CollectionView.RenderEnd(context); } RenderAccelCommands(context); RenderContextMenus(); dialog.RenderEnd(context); }
internal override void RenderElement(RenderContext context, Action <TagBuilder> onRender = null) { if (SkipRender(context)) { return; } TagBuilder page = null; Boolean isGridPage = (Toolbar != null) || (Taskpad != null) || (Pager != null); // render page OR colleciton view void addGridAction(TagBuilder tag) { if (!isGridPage) { return; } tag.AddCssClass("page-grid"); if (Taskpad != null) { if (Taskpad is Taskpad tp && tp.Width != null) { tag.MergeStyle("grid-template-columns", $"1fr {tp.Width.Value}"); } } } if (CollectionView != null) { CollectionView.RenderStart(context, (tag) => { tag.AddCssClass("page").AddCssClass("absolute"); addGridAction(tag); AddAttributes(tag); tag.MergeAttribute("id", context.RootId); }); } else { page = new TagBuilder("div", "page absolute"); page.MergeAttribute("id", context.RootId); addGridAction(page); AddAttributes(page); page.RenderStart(context); } RenderTitle(context); if (isGridPage) { Toolbar?.RenderElement(context, (tag) => tag.AddCssClass("page-toolbar")); Taskpad?.RenderElement(context, (tag) => tag.AddCssClass("page-taskpad")); Pager?.RenderElement(context, (tag) => tag.AddCssClass("page-pager")); var content = new TagBuilder("div", "page-content").RenderStart(context); RenderChildren(context); content.RenderEnd(context); } else { RenderChildren(context); } if (CollectionView != null) { CollectionView.RenderEnd(context); } else { if (page == null) { throw new InvalidProgramException(); } page.RenderEnd(context); } }