Beispiel #1
0
        /// <summary>
        /// Adds the specified rule set to the style prioritizer.
        /// </summary>
        private void AddRuleSetToPrioritizer(UIElement element, UvssSelector selector, UvssRuleSet ruleSet, Int32 index)
        {
            if (!selector.MatchesElement(element))
            {
                return;
            }

            var navexp = NavigationExpression.FromUvssNavigationExpression(Ultraviolet, selector.NavigationExpression);

            foreach (var rule in ruleSet.Rules)
            {
                prioritizer.Add(Ultraviolet, selector, navexp, rule, index);
            }

            foreach (var trigger in ruleSet.Triggers)
            {
                prioritizer.Add(Ultraviolet, selector, navexp, trigger, index);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of thhe <see cref="CategorizedRuleSet"/> structure.
 /// </summary>
 /// <param name="selector">The selector which applies the categorized rule set.</param>
 /// <param name="ruleSet">The rule set which has been categorized.</param>
 /// <param name="index">The index of the rule set within the style sheet.</param>
 public CategorizedRuleSet(UvssSelector selector, UvssRuleSet ruleSet, Int32 index)
 {
     this.Selector = selector;
     this.RuleSet  = ruleSet;
     this.Index    = index;
 }