ActualSize executes CalculatePosition

This commit is contained in:
JFronny 2020-06-12 18:16:47 +02:00
parent 5d380112ac
commit 9e6b441169
1 changed files with 17 additions and 5 deletions

View File

@ -10,11 +10,7 @@ namespace CC_Functions.Commandline.TUI
public class CenteredScreen : Screen
{
private bool _resizing;
/// <summary>
/// The actual size of this control. The "Size" property is assigned automatically
/// </summary>
public Size ActualSize;
private Size _actualSize;
/// <summary>
/// The panel used for storing and rendering the actual controls
@ -59,6 +55,22 @@ namespace CC_Functions.Commandline.TUI
}
}
/// <summary>
/// The actual size of this control. The "Size" property is assigned automatically
/// </summary>
public Size ActualSize
{
get => _actualSize;
set
{
if (_actualSize != value)
{
_actualSize = value;
CalculatePosition(true);
}
}
}
/// <summary>
/// Calculates the Size variable, Title and ContentPanel position/size
/// </summary>