// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
namespace Perspex.Controls
{
///
/// Holds a row definitions for a .
///
public class RowDefinition : DefinitionBase
{
///
/// Defines the property.
///
public static readonly PerspexProperty MaxHeightProperty =
PerspexProperty.Register("MaxHeight", double.PositiveInfinity);
///
/// Defines the property.
///
public static readonly PerspexProperty MinHeightProperty =
PerspexProperty.Register("MinHeight");
///
/// Defines the property.
///
public static readonly PerspexProperty HeightProperty =
PerspexProperty.Register("Height", new GridLength(1, GridUnitType.Star));
///
/// Initializes a new instance of the class.
///
public RowDefinition()
{
}
///
/// Initializes a new instance of the class.
///
/// The height of the row.
/// The height unit of the column.
public RowDefinition(double value, GridUnitType type)
{
Height = new GridLength(value, type);
}
///
/// Initializes a new instance of the class.
///
/// The height of the column.
public RowDefinition(GridLength height)
{
Height = height;
}
///
/// Gets the actual calculated height of the row.
///
public double ActualHeight
{
get;
internal set;
}
///
/// Gets or sets the maximum height of the row in DIPs.
///
public double MaxHeight
{
get { return GetValue(MaxHeightProperty); }
set { SetValue(MaxHeightProperty, value); }
}
///
/// Gets or sets the minimum height of the row in DIPs.
///
public double MinHeight
{
get { return GetValue(MinHeightProperty); }
set { SetValue(MinHeightProperty, value); }
}
///
/// Gets or sets the height of the row.
///
public GridLength Height
{
get { return GetValue(HeightProperty); }
set { SetValue(HeightProperty, value); }
}
}
}