Ejemplo n.º 1
0
        public StyleActivator GetActivator(IStyleable control)
        {
            List <IObservable <bool> > inputs = new List <IObservable <bool> >();
            Selector selector = this;

            while (selector != null)
            {
                if (selector.InTemplate && control.TemplatedParent == null)
                {
                    inputs.Add(Observable.Return(false));
                }
                else
                {
                    inputs.Add(selector.GetObservable(control));
                }

                selector = selector.MovePrevious();
            }

            return(new StyleActivator(inputs));
        }