add title attribute to custombloxstrapbootstrapper

This commit is contained in:
bluepilledgreat 2024-10-21 20:46:21 +01:00
parent d924349a79
commit 5f7ca580e4
2 changed files with 5 additions and 2 deletions

View File

@ -30,7 +30,8 @@
"SuperClass": "Control", "SuperClass": "Control",
"IsCreatable": true, "IsCreatable": true,
"Attributes": { "Attributes": {
"Theme": "Theme" "Theme": "Theme",
"Title": "string"
} }
}, },
"TitleBar": { "TitleBar": {

View File

@ -501,6 +501,9 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
dialog.Margin = new Thickness(0, 0, 0, 0); dialog.Margin = new Thickness(0, 0, 0, 0);
dialog.Padding = 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(); return new DummyFrameworkElement();
} }
@ -528,7 +531,6 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
dialog.RootTitleBar.ShowClose = ParseXmlAttribute<bool>(xmlElement, "ShowClose", true); dialog.RootTitleBar.ShowClose = ParseXmlAttribute<bool>(xmlElement, "ShowClose", true);
string? title = xmlElement.Attribute("Title")?.Value?.ToString() ?? "Bloxstrap"; string? title = xmlElement.Attribute("Title")?.Value?.ToString() ?? "Bloxstrap";
dialog.Title = title;
dialog.RootTitleBar.Title = title; dialog.RootTitleBar.Title = title;
return new DummyFrameworkElement(); // dont add anything return new DummyFrameworkElement(); // dont add anything