Пример #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));
            }
        }
Пример #2
0
 public static DescendantSelector WithDirectChild(this IStyleSelector parentElement, ISimpleSelector innerChild)
 {
     return(new DescendantSelector(innerChild, parentElement, true));
 }
Пример #3
0
 public static ConditionalSelector WithCondition(this ISimpleSelector selector, ICondition condition)
 {
     return(new ConditionalSelector(selector, condition));
 }
Пример #4
0
 public ConditionalSelector(ISimpleSelector selector, ICondition condition)
 {
     Selector  = selector;
     Condition = condition;
 }
Пример #5
0
 public DescendantSelector(ISimpleSelector selector, IStyleSelector parentSelector, bool directChild = false)
 {
     DirectChild       = directChild;
     Selector          = selector;
     AnchestorSelector = parentSelector;
 }