/// <summary>
 /// Recursively lays out all lightweight controls in this lightweight control.
 /// </summary>
 /// <param name="BehaviorControlContainerControl"></param>
 private void aLayoutBehaviorControls(IBehaviorControlContainerControl BehaviorControlContainerControl)
 {
     //	If there are lightweight controls to layout, enumerate them.
     if (BehaviorControlContainerControl.Controls != null)
     {
         //	Enumerate the child lightweight controls and layout each one.
         foreach (BehaviorControl BehaviorControl in BehaviorControlContainerControl.Controls)
         {
             //	Recursively layout all the lightweight controls in the lightweight control,
             //	then layout the lightweight control.
             aLayoutBehaviorControls(BehaviorControl);
             BehaviorControl.PerformLayout();
         }
     }
 }
예제 #2
0
        /// <summary>
        /// Inserts a <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControl'/> into the <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControlCollection'/> at the specified index.
        /// </summary>
        /// <param name='index'>The zero-based index where <paramref name='value'/> should be inserted.</param>
        /// <param name=' value'>The <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControl'/> to insert.</param>
        /// <seealso cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControlCollection.Add'/>
        public void Insert(int index, BehaviorControl value)
        {
            //	Insert.
            List.Insert(index, value);

            OnControlAdded(value);

            //	Set the Behavior control container of the Behavior control to the owner of
            //	this Behavior control collection.
            value.ContainerControl = owner;

            //	Force the Behavior control to apply layout logic to child controls.
            value.PerformLayout();

            //	Force the owner of this Behavior control collection to apply layout logic to child controls.
            owner.PerformLayout();
        }
예제 #3
0
        /// <summary>
        /// Adds a <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControl'/> with the specified value to the
        /// <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControlCollection'/> .
        /// </summary>
        /// <param name='value'>The <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControl'/> to add.</param>
        /// <returns>The index at which the new element was inserted.</returns>
        /// <seealso cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControlCollection.AddRange'/>
        public int Add(BehaviorControl value)
        {
            //	Add.
            int index = List.Add(value);

            //	Set the Behavior control container of the Behavior control to the owner of
            //	this Behavior control collection.
            value.ContainerControl = owner;

            OnControlAdded(value);

            //	Force the Behavior control to apply layout logic to child controls.
            value.PerformLayout();

            //	Force the owner of this Behavior control collection to apply layout logic to child controls.
            owner.PerformLayout();

            //	Return index.
            return(index);
        }
        /// <summary>
        /// Adds a <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControl'/> with the specified value to the
        /// <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControlCollection'/> .
        /// </summary>
        /// <param name='value'>The <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControl'/> to add.</param>
        /// <returns>The index at which the new element was inserted.</returns>
        /// <seealso cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControlCollection.AddRange'/>
        public int Add(BehaviorControl value)
        {
            //	Add.
            int index = List.Add(value);

            //	Set the Behavior control container of the Behavior control to the owner of
            //	this Behavior control collection.
            value.ContainerControl = owner;

            OnControlAdded(value);

            //	Force the Behavior control to apply layout logic to child controls.
            value.PerformLayout();

            //	Force the owner of this Behavior control collection to apply layout logic to child controls.
            owner.PerformLayout();

            //	Return index.
            return index;
        }
        /// <summary>
        /// Inserts a <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControl'/> into the <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControlCollection'/> at the specified index.
        /// </summary>
        /// <param name='index'>The zero-based index where <paramref name='value'/> should be inserted.</param>
        /// <param name=' value'>The <see cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControl'/> to insert.</param>
        /// <seealso cref='OpenLiveWriter.PostEditor.PostHtmlEditing.Behaviors.BehaviorControlCollection.Add'/>
        public void Insert(int index, BehaviorControl value)
        {
            //	Insert.
            List.Insert(index, value);

            OnControlAdded(value);

            //	Set the Behavior control container of the Behavior control to the owner of
            //	this Behavior control collection.
            value.ContainerControl = owner;

            //	Force the Behavior control to apply layout logic to child controls.
            value.PerformLayout();

            //	Force the owner of this Behavior control collection to apply layout logic to child controls.
            owner.PerformLayout();
        }