mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
add fake BloxstrapCustomBootstrapper
This commit is contained in:
parent
fb7e14bf64
commit
56fa51df8b
@ -29,6 +29,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
|
||||
private static Dictionary<string, HandleXmlElementDelegate> _elementHandlerMap = new Dictionary<string, HandleXmlElementDelegate>()
|
||||
{
|
||||
["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
|
||||
|
Loading…
Reference in New Issue
Block a user