public void CheckRuleSetForLayout_Group(IStyleRuleSet child) { if (this.RuleSet.IsFixedWidth) { Debug.Assert(!this.RuleSet.HorizontallyStretched); if (this.IsVertical && child.RuleSet.HorizontalStretchFactor > 1) { child.RuleSet.HorizontalStretchFactor = 1; } } else if (this.RuleSet.HorizontallyStretched) { if (this.IsVertical && child.RuleSet.HorizontalStretchFactor > 1) { child.RuleSet.HorizontalStretchFactor = 1; } } else { child.RuleSet.HorizontalStretchFactor = 0; } if (this.RuleSet.IsFixedHeight) { Debug.Assert(!this.RuleSet.VerticallyStretched); if (!this.IsVertical && child.RuleSet.VerticalStretchFactor > 1) { child.RuleSet.VerticalStretchFactor = 1; } } else if (this.RuleSet.VerticallyStretched) { if (!this.IsVertical && child.RuleSet.VerticalStretchFactor > 1) { child.RuleSet.VerticalStretchFactor = 1; } } else { child.RuleSet.VerticalStretchFactor = 0; } }
public void OnAddLayoutEntry(IStyleRuleSet layoutEntry) { if (this.node.RuleSet.IsFixedWidth) { Debug.Assert(!this.node.RuleSet.HorizontallyStretched); if (this.IsVertical && layoutEntry.RuleSet.HorizontalStretchFactor > 1) { layoutEntry.RuleSet.HorizontalStretchFactor = 1; } } else if (this.node.RuleSet.HorizontallyStretched) { if (this.IsVertical && layoutEntry.RuleSet.HorizontalStretchFactor > 1) { layoutEntry.RuleSet.HorizontalStretchFactor = 1; } } else { layoutEntry.RuleSet.HorizontalStretchFactor = 0; } if (this.node.RuleSet.IsFixedHeight) { Debug.Assert(!this.node.RuleSet.VerticallyStretched); if (!this.IsVertical && layoutEntry.RuleSet.VerticalStretchFactor > 1) { layoutEntry.RuleSet.VerticalStretchFactor = 1; } } else if (this.node.RuleSet.VerticallyStretched) { if (!this.IsVertical && layoutEntry.RuleSet.VerticalStretchFactor > 1) { layoutEntry.RuleSet.VerticalStretchFactor = 1; } } else { layoutEntry.RuleSet.VerticalStretchFactor = 0; } }
public StyleRuleSetBuilder(IStyleRuleSet ruleSet) { this.s = ruleSet.RuleSet; }