Beispiel #1
0
 public void Attach(ElementSelector selector, Action<StylingRule, double> ruleSet, AnimationSpan span)
 {
     var style = new StylingRule();
     ResolveSelector(selector, style);
     stylingrules.Add((time) =>
     {
         ruleSet(style, time);
         span.Update(time);
     });
     span.OnAnimationEnd += (sender, args) => stylingrules.RemoveAt(stylingrules.Count - 1);
 }
Beispiel #2
0
 public void Attach(ElementSelector selector, IStylingRule ruleSet)
 {
     ResolveSelector(selector, ruleSet);
 }
Beispiel #3
0
 public void Attach(ElementSelector selector, Action<StylingRule> ruleSet)
 {
     var style = new StylingRule();
     ResolveSelector(selector, style);
     ruleSet(style);
 }
Beispiel #4
0
        private void ResolveSelector(ElementSelector selector, IStylingRule rule)
        {
            var selectedElements = selector.GetSelection(guiTree);

            foreach (var element in selectedElements)
            {
                AddElement(element, rule, selector.Priority);
            }
        }