port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace NodeNetwork.Views.Controls
{
/// <summary>
/// Simple panel that stretches its children to fill the panel.
/// </summary>
public class FillPanel : Panel
{
protected override Size MeasureOverride(Size availableSize)
{
Size maxSize = new Size(0, 0);
foreach (UIElement e in InternalChildren)
{
e.Measure(availableSize);
maxSize = new Size(
Math.Max(maxSize.Width, e.DesiredSize.Width),
Math.Max(maxSize.Height, e.DesiredSize.Height)
);
}
return maxSize;
}
protected override Size ArrangeOverride(Size finalSize)
{
Rect size = new Rect(new Point(), finalSize);
foreach (UIElement e in InternalChildren)
{
e.Arrange(size);
}
return finalSize;
}
}
}