Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
DynamicContainer.cs
1using System.Threading.Tasks;
2
4{
10 {
18 : base(Document, Parent)
19 {
20 }
21
26 {
27 get;
28 }
29
34 public override async Task Draw(DrawingState State)
35 {
37
38 if (!(Children is null))
39 {
40 foreach (ILayoutElement E in Children)
41 {
42 if (E.IsVisible)
43 await E.Draw(State);
44 }
45 }
46 }
47
52 public override void MeasurePositions(DrawingState State)
53 {
54 base.MeasurePositions(State);
55
57
58 if (!(Children is null))
59 {
60 foreach (ILayoutElement E in Children)
61 {
62 if (E.IsVisible)
63 E.MeasurePositions(State);
64 }
65 }
66 }
67
71 protected override bool MeasureChildrenPositions => false;
72
73 }
74}
Contains a 2D layout document.
Abstract base class of dynamic layout containers (i.e. containers that can generate child elements dy...
override bool MeasureChildrenPositions
If children positions are to be measured.
override void MeasurePositions(DrawingState State)
Measures layout entities and defines unassigned properties, related to positions.
DynamicContainer(Layout2DDocument Document, ILayoutElement Parent)
Abstract base class of dynamic layout containers (i.e. containers that can generate child elements dy...
override async Task Draw(DrawingState State)
Draws layout entities.
abstract ILayoutElement[] DynamicChildren
Dynamic array of children
Abstract base class for layout containers (area elements containing embedded layout elements).
ILayoutElement[] Children
Child elements
Interface for layout elements that generate children dynamically.
Base interface for all layout elements.
Task Draw(DrawingState State)
Draws layout entities.
bool IsVisible
If the element is visible or not.
void MeasurePositions(DrawingState State)
Measures layout entities and defines unassigned properties, related to positions.