Exemplo n.º 1
0
        void ProcessSimpleSelector(XElement style, ISimpleSelector selector)
        {
            if (selector is ConditionalSelector)
            {
                var cs         = (ConditionalSelector)selector;
                var conditions = new XElement("conditions");
                conditionWriter.Write(StyleSystem, conditions, cs.Condition, conditionWriter);
                style.Add(conditions);
                selector = cs.Selector;
            }

            if (selector is ElementSelector)
            {
                var es = (ElementSelector)selector;
                style.Add(new XAttribute("element", es.TypeName));
            }
        }
Exemplo n.º 2
0
 public static DescendantSelector WithDirectChild(this IStyleSelector parentElement, ISimpleSelector innerChild)
 {
     return(new DescendantSelector(innerChild, parentElement, true));
 }
Exemplo n.º 3
0
 public static ConditionalSelector WithCondition(this ISimpleSelector selector, ICondition condition)
 {
     return(new ConditionalSelector(selector, condition));
 }
Exemplo n.º 4
0
 public ConditionalSelector(ISimpleSelector selector, ICondition condition)
 {
     Selector  = selector;
     Condition = condition;
 }
Exemplo n.º 5
0
 public DescendantSelector(ISimpleSelector selector, IStyleSelector parentSelector, bool directChild = false)
 {
     DirectChild       = directChild;
     Selector          = selector;
     AnchestorSelector = parentSelector;
 }