コード例 #1
0
 /// <summary>
 /// Add this element into the logical tree.
 /// </summary>
 /// <param name="parent">Interface of logical parent.</param>
 public virtual void AddToLogicalTree(ILogicalParent parent)
 {
     if (parent != null)
     {
         parent.LogicalChildAdd(this);
     }
 }
コード例 #2
0
 /// <summary>
 /// Add this element from the logial tree.
 /// </summary>
 /// <param name="parent">Interface of logical parent.</param>
 public virtual void RemoveFromLogicalTree(ILogicalParent parent)
 {
     if (parent != null)
     {
         parent.LogicalChildRemove(this);
     }
 }
コード例 #3
0
ファイル: GridLayout.cs プロジェクト: nagyist/Quicksilver-1
        /// <summary>
        /// Add this element into the logical tree.
        /// </summary>
        /// <param name="parent">Interface of logical parent.</param>
        public override void AddToLogicalTree(ILogicalParent parent)
        {
            // Add ourself into the logical tree
            base.AddToLogicalTree(parent);

            // Add any existing cols/rows into the logical tree
            ColumnDefinitions.LogicalParent = parent;
            foreach (ColumnDefinition col in ColumnDefinitions)
            {
                col.AddToLogicalTree(parent);
            }

            RowDefinitions.LogicalParent = parent;
            foreach (RowDefinition row in RowDefinitions)
            {
                row.AddToLogicalTree(parent);
            }
        }
コード例 #4
0
ファイル: GridLayout.cs プロジェクト: nagyist/Quicksilver-1
        /// <summary>
        /// Add this element from the logial tree.
        /// </summary>
        /// <param name="parent">Interface of logical parent.</param>
        public override void RemoveFromLogicalTree(ILogicalParent parent)
        {
            // Remove ourself into the logical tree
            base.RemoveFromLogicalTree(parent);

            // Remove any existing cols/rows from the logical tree
            foreach (ColumnDefinition col in ColumnDefinitions)
            {
                col.RemoveFromLogicalTree(parent);
            }

            foreach (RowDefinition row in RowDefinitions)
            {
                row.RemoveFromLogicalTree(parent);
            }

            ColumnDefinitions.LogicalParent = parent;
            RowDefinitions.LogicalParent    = parent;
        }
コード例 #5
0
 /// <summary>
 ///     The colleciton is the children collection of the visualParent. The logicalParent
 ///     is used to do logical parenting. The flags is used to invalidate
 ///     the resource properties in the child tree, if an Application object exists.
 /// </summary>
 /// <param name="visualParent">The element of whom this is a children collection</param>
 /// <param name="logicalParent">The logicalParent of the elements of this collection.
 /// if overriding Panel.CreateUIElementCollection, pass the logicalParent parameter of that method here.
 /// </param>
 public UIElementCollection(FrameworkElement parent)
 {
     _visualChildren = new VisualCollection(parent);
     _visualParent   = parent;
     _logicalParent  = (ILogicalParent)parent;
 }
コード例 #6
0
        /// <summary>
        /// Add this element from the logial tree.
        /// </summary>
        /// <param name="parent">Interface of logical parent.</param>
        public override void RemoveFromLogicalTree(ILogicalParent parent)
        {
            // Remove ourself into the logical tree
            base.RemoveFromLogicalTree(parent);

            // Remove any existing cols/rows from the logical tree
            foreach (ColumnDefinition col in ColumnDefinitions)
                col.RemoveFromLogicalTree(parent);

            foreach (RowDefinition row in RowDefinitions)
                row.RemoveFromLogicalTree(parent);

            ColumnDefinitions.LogicalParent = parent;
            RowDefinitions.LogicalParent = parent;
        }
コード例 #7
0
        /// <summary>
        /// Add this element into the logical tree.
        /// </summary>
        /// <param name="parent">Interface of logical parent.</param>
        public override void AddToLogicalTree(ILogicalParent parent)
        {
            // Add ourself into the logical tree
            base.AddToLogicalTree(parent);

            // Add any existing cols/rows into the logical tree
            ColumnDefinitions.LogicalParent = parent;
            foreach (ColumnDefinition col in ColumnDefinitions)
                col.AddToLogicalTree(parent);

            RowDefinitions.LogicalParent = parent;
            foreach (RowDefinition row in RowDefinitions)
                row.AddToLogicalTree(parent);
        }
コード例 #8
0
 /// <summary>
 /// Initialize a new instance of the MeasureElementCollection class.
 /// </summary>
 /// <param name="logicalParent">Reference to logical parent of this collection.</param>
 internal MeasureElementCollection(ILogicalParent logicalParent)
 {
     _logicalParent = logicalParent;
     _list          = new List <T>();
 }