CPF/CPF.ReoGrid/Drawing/DrawingComponentStyle.cs
2024-06-24 10:15:59 +08:00

30 lines
605 B
C#

using System;
using CPF.Drawing;
namespace CPF.ReoGrid.Drawing
{
public class DrawingComponentStyle : DrawingObjectStyle, IDrawingComponentStyle, IDrawingObjectStyle
{
internal DrawingComponentStyle(DrawingComponent owner) : base(owner)
{
}
public PaddingValue Padding
{
get
{
base.ValidateReferenceOwner();
return base.OwnerObject.Padding;
}
set
{
base.ValidateReferenceOwner();
Rect bounds = base.OwnerObject.Bounds;
base.OwnerObject.Padding = value;
base.OwnerObject.InternalBoundsUpdate(bounds);
base.OwnerObject.Invalidate();
}
}
}
}