diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs index 9a339e0..d47e109 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs @@ -29,6 +29,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper private static Dictionary _elementHandlerMap = new Dictionary() { + ["BloxstrapCustomBootstrapper"] = HandleXmlElement_BloxstrapCustomBootstrapper_Fake, ["TitleBar"] = HandleXmlElement_TitleBar, ["Button"] = HandleXmlElement_Button, ["ProgressBar"] = HandleXmlElement_ProgressBar, @@ -503,6 +504,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper return new DummyFrameworkElement(); } + private static UIElement HandleXmlElement_BloxstrapCustomBootstrapper_Fake(CustomDialog dialog, XElement xmlElement) + { + // this only exists to error out the theme if someone tries to use two BloxstrapCustomBootstrappers + throw new Exception($"{xmlElement.Parent!.Name} cannot have a child of {xmlElement.Name}"); + } + private static DummyFrameworkElement HandleXmlElement_TitleBar(CustomDialog dialog, XElement xmlElement) { xmlElement.SetAttributeValue("Name", "TitleBar"); // prevent two titlebars from existing