aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DStackPanel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DStackPanel.cs')
-rw-r--r--Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DStackPanel.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DStackPanel.cs b/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DStackPanel.cs
index edcaa34f6..e27e0435f 100644
--- a/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DStackPanel.cs
+++ b/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DStackPanel.cs
@@ -86,5 +86,25 @@ namespace Tango.Graphics2D
return new Size(_currentPosition, _maxPosition);
}
}
+
+ public override Size GetElementSize(FrameworkElement element)
+ {
+ double width = element.Width;
+ double height = element.Height;
+
+ if (double.IsNaN(width))
+ {
+ width = ActualWidth;
+ }
+ if (double.IsNaN(height))
+ {
+ height = ActualHeight;
+ }
+
+ width -= (element.Margin.Left + element.Margin.Right);
+ height -= (element.Margin.Top + element.Margin.Bottom);
+
+ return new Size(width, height);
+ }
}
}