mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
count descendants and increase element cap
This commit is contained in:
parent
61f8235a74
commit
23e1b2d737
@ -14,7 +14,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
{
|
{
|
||||||
public partial class CustomDialog
|
public partial class CustomDialog
|
||||||
{
|
{
|
||||||
private const int MaxElements = 50;
|
private const int MaxElements = 100;
|
||||||
|
|
||||||
private static ThicknessConverter? _thicknessConverter = null;
|
private static ThicknessConverter? _thicknessConverter = null;
|
||||||
private static ThicknessConverter ThicknessConverter { get => _thicknessConverter ??= new ThicknessConverter(); }
|
private static ThicknessConverter ThicknessConverter { get => _thicknessConverter ??= new ThicknessConverter(); }
|
||||||
@ -691,7 +691,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
if (xml.Attribute("Version")?.Value != "0")
|
if (xml.Attribute("Version")?.Value != "0")
|
||||||
throw new Exception("Unknown BloxstrapCustomBootstrapper version");
|
throw new Exception("Unknown BloxstrapCustomBootstrapper version");
|
||||||
|
|
||||||
if (xml.Elements().Count() > MaxElements)
|
if (xml.Descendants().Count() > MaxElements)
|
||||||
throw new Exception($"Custom bootstrappers can have a maximum of {MaxElements} elements");
|
throw new Exception($"Custom bootstrappers can have a maximum of {MaxElements} elements");
|
||||||
|
|
||||||
_initialised = true;
|
_initialised = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user