public virtual MarginsCollapse Clone() { MarginsCollapse collapse = new MarginsCollapse(); collapse.maxPositiveMargin = this.maxPositiveMargin; collapse.minNegativeMargin = this.minNegativeMargin; return(collapse); }
internal MarginsCollapseInfo() { this.ignoreOwnMarginTop = false; this.ignoreOwnMarginBottom = false; this.collapseBefore = new MarginsCollapse(); this.collapseAfter = new MarginsCollapse(); this.isSelfCollapsing = true; this.bufferSpaceOnTop = 0; this.bufferSpaceOnBottom = 0; this.usedBufferSpaceOnTop = 0; this.usedBufferSpaceOnBottom = 0; this.clearanceApplied = false; }
internal MarginsCollapseInfo(bool ignoreOwnMarginTop, bool ignoreOwnMarginBottom, MarginsCollapse collapseBefore , MarginsCollapse collapseAfter) { this.ignoreOwnMarginTop = ignoreOwnMarginTop; this.ignoreOwnMarginBottom = ignoreOwnMarginBottom; this.collapseBefore = collapseBefore; this.collapseAfter = collapseAfter; this.isSelfCollapsing = true; this.bufferSpaceOnTop = 0; this.bufferSpaceOnBottom = 0; this.usedBufferSpaceOnTop = 0; this.usedBufferSpaceOnBottom = 0; this.clearanceApplied = false; }
internal MarginsCollapseInfo() { // MarginCollapse instance which contains margin-after of the element without next sibling or parent margins (only element's margin and element's kids) // when a parent has a fixed height these fields tells kid how much free space parent has for the margin collapsed with kid this.ignoreOwnMarginTop = false; this.ignoreOwnMarginBottom = false; this.collapseBefore = new MarginsCollapse(); this.collapseAfter = new MarginsCollapse(); this.isSelfCollapsing = true; this.bufferSpaceOnTop = 0; this.bufferSpaceOnBottom = 0; this.usedBufferSpaceOnTop = 0; this.usedBufferSpaceOnBottom = 0; this.clearanceApplied = false; }
internal virtual void SetOwnCollapseAfter(MarginsCollapse marginsCollapse) { this.ownCollapseAfter = marginsCollapse; }
internal virtual void SetCollapseAfter(MarginsCollapse collapseAfter) { this.collapseAfter = collapseAfter; }
internal virtual void JoinMargin(MarginsCollapse marginsCollapse) { JoinMargin(marginsCollapse.maxPositiveMargin); JoinMargin(marginsCollapse.minNegativeMargin); }