/// <summary>
        /// Initializes a new instance of the <see cref="ColumnDefinitionCollection"/> class.
        /// </summary>
        /// <param name="grid">The <see cref="Grid"/> that owns the collection.</param>
        internal ColumnDefinitionCollection(Grid grid)
        {
            Contract.Require(grid, nameof(grid));

            this.grid           = grid;
            this.implicitColumn = new ColumnDefinition() { Grid = grid, Width = new GridLength(1.0, GridUnitType.Star) };
            this.implicitStorage.Add(implicitColumn);
        }
        /// <summary>
        /// Gets a value indicating whether the collection contains the specified column.
        /// </summary>
        /// <param name="definition">The column to evaluate.</param>
        /// <returns><c>true</c> if the collection contains the specified column; otherwise, <c>false</c>.</returns>
        public Boolean Contains(ColumnDefinition definition)
        {
            Contract.Require(definition, "definition");

            if (storage.Count == 0)
            {
                return definition == implicitColumn;
            }
            return storage.Contains(definition);
        }
        /// <summary>
        /// Adds a column to the collection.
        /// </summary>
        /// <param name="definition">The column definition to add to the collection.</param>
        public void Add(ColumnDefinition definition)
        {
            Contract.Require(definition, "definition");

            if (definition.Grid != null)
                definition.Grid.ColumnDefinitions.Remove(definition);

            definition.Grid = grid;
            storage.Add(definition);

            OnModified();
        }
        /// <summary>
        /// Removes a column from the collection.
        /// </summary>
        /// <param name="definition">The column to remove from the collection.</param>
        /// <returns><c>true</c> if the specified column was removed from the collection; otherwise, <c>false</c>.</returns>
        public Boolean Remove(ColumnDefinition definition)
        {
            Contract.Require(definition, "definition");

            if (storage.Remove(definition))
            {
                definition.Grid = null;

                OnModified();
                return true;
            }
            return false;
        }