private IRuleset GetToolStripItemRuleset(ToolStrip parent, ToolStripItem item) { UserNode node = GetToolStripItemNode(item); node.SetParent(new ControlNode(parent)); return(styleSheet.GetRuleset(node)); }
public void TestPropertyWithLeadingWhitespaceBeforeValue() { string styleSheetStr = "class { border-width: 10px; }"; IStyleSheet styleSheet = StyleSheet.Parse(styleSheetStr); IRuleset ruleset = styleSheet.GetRuleset(new UserNode("class", Enumerable.Empty <string>())); Assert.AreEqual(10.0, ruleset.GetProperty(PropertyType.BorderWidth).Value); }
public static IRuleset GetRuleset(this IStyleSheet styleSheet, INode node, IRuleset parentRuleset) { IRuleset ruleset = new Ruleset(); ruleset.InheritProperties(parentRuleset); ruleset.AddProperties(styleSheet.GetRuleset(node)); return(ruleset); }
// Public members public static IRuleset GetRuleset(this IStyleSheet styleSheet, Control control) { return(styleSheet.GetRuleset(control, true)); }
public static IRuleset GetRuleset(this IStyleSheet styleSheet, INode node, Control parent) { return(styleSheet.GetRuleset(node, styleSheet.GetRuleset(parent))); }
public static IRuleset GetRuleset(this IStyleSheet styleSheet, Control control, bool inherit) { return(styleSheet.GetRuleset(new ControlNode(control), inherit)); }
private IRuleset GetColumnHeaderRuleset(ColumnHeader columnHeader) { return(styleSheet.GetRuleset(GetColumnHeaderNode(columnHeader))); }