DotNet 4.8.1 build of DotNetBar

This commit is contained in:
2025-02-07 10:35:23 -05:00
parent 33439b63a0
commit 6b0a5d60f4
2609 changed files with 989814 additions and 7 deletions

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections;
using DevComponents.UI.ContentManager;
using System.Drawing;
namespace DevComponents.DotNetBar
{
/// <summary>
/// Represents IBlock layout manager implementation
/// </summary>
public class ItemBlockLayoutManager:BlockLayoutManager
{
/// <summary>
/// Resizes the content block and sets it's Bounds property to reflect new size.
/// </summary>
/// <param name="block">Content block to resize.</param>
public override void Layout(IBlock block, Size availableSize)
{
if(block is BaseItem)
{
BaseItem item=block as BaseItem;
if (item is ItemContainer || item.IsContainer)
{
item.SuspendLayout = true;
item.WidthInternal = availableSize.Width;
item.HeightInternal = availableSize.Height;
item.SuspendLayout = false;
}
item.RecalcSize();
item.Displayed=item.Visible;
}
}
public override Rectangle FinalizeLayout(Rectangle containerBounds, Rectangle blocksBounds, ArrayList lines)
{
return (blocksBounds);
}
}
}