From 5f7ca580e47fc0cd1f34abdf309e3d423c9cfc72 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Mon, 21 Oct 2024 20:46:21 +0100 Subject: [PATCH] add title attribute to custombloxstrapbootstrapper --- Bloxstrap/Resources/CustomBootstrapperSchema.json | 3 ++- Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Bloxstrap/Resources/CustomBootstrapperSchema.json b/Bloxstrap/Resources/CustomBootstrapperSchema.json index 5bd2b58..f29ff75 100644 --- a/Bloxstrap/Resources/CustomBootstrapperSchema.json +++ b/Bloxstrap/Resources/CustomBootstrapperSchema.json @@ -30,7 +30,8 @@ "SuperClass": "Control", "IsCreatable": true, "Attributes": { - "Theme": "Theme" + "Theme": "Theme", + "Title": "string" } }, "TitleBar": { diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs index d47e109..f472c3c 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs @@ -501,6 +501,9 @@ namespace Bloxstrap.UI.Elements.Bootstrapper dialog.Margin = new Thickness(0, 0, 0, 0); dialog.Padding = new Thickness(0, 0, 0, 0); + string? title = xmlElement.Attribute("Title")?.Value?.ToString() ?? "Bloxstrap"; + dialog.Title = title; + return new DummyFrameworkElement(); } @@ -528,7 +531,6 @@ namespace Bloxstrap.UI.Elements.Bootstrapper dialog.RootTitleBar.ShowClose = ParseXmlAttribute(xmlElement, "ShowClose", true); string? title = xmlElement.Attribute("Title")?.Value?.ToString() ?? "Bloxstrap"; - dialog.Title = title; dialog.RootTitleBar.Title = title; return new DummyFrameworkElement(); // dont add anything