Esempio n. 1
0
        /// <inheritdoc/>
        protected override sealed IndexerDescriptor CreateBindingDescriptor(IndexerDescriptor source)
        {
            var result = base.CreateBindingDescriptor(source);

            // If the binding is a template binding, then complete when the Template changes.
            if (source.Priority == BindingPriority.TemplatedParent)
            {
                var templateChanged = this.GetObservable(TemplateProperty).Skip(1);

                result.SourceObservable = result.Source.GetObservable(result.Property)
                    .TakeUntil(templateChanged);
            }

            return result;
        }