Exemple #1
0
        public PriorityValue(
            IAvaloniaObject owner,
            StyledPropertyBase <T> property,
            IValueSink sink)
        {
            _owner   = owner;
            Property = property;
            _sink    = sink;

            if (property.HasCoercion)
            {
                var metadata = property.GetMetadata(owner.GetType());
                _coerceValue = metadata.CoerceValue;
            }
        }
        public PriorityValue(
            AvaloniaObject owner,
            StyledPropertyBase <T> property,
            ValueStore store)
        {
            _owner   = owner;
            Property = property;
            _store   = store;

            if (property.HasCoercion)
            {
                var metadata = property.GetMetadata(owner.GetType());
                _coerceValue = metadata.CoerceValue;
            }
        }