// -----------------------------------------------------------------------
//
// Copyright 2014 MIT Licence. See licence.md for more information.
//
// -----------------------------------------------------------------------
namespace Perspex.Controls
{
using System;
using System.Collections.Generic;
using System.Linq;
///
/// Base class for controls that can contain multiple children.
///
public class Panel : Control
{
private Controls children;
public Controls Children
{
get
{
if (this.children == null)
{
this.children = new Controls();
}
return this.children;
}
set
{
Contract.Requires(value != null);
if (this.children != value)
{
this.children = value;
this.ClearVisualChildren();
this.AddVisualChildren(value);
}
}
}
}
}