Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PriorityLevel"/> class.
        /// </summary>
        /// <param name="priority">The priority.</param>
        /// <param name="mode">The precedence mode.</param>
        /// <param name="changed">A method to be called when the current value changes.</param>
        public PriorityLevel(
            int priority,
            LevelPrecedenceMode mode,
            Action <PriorityLevel> changed)
        {
            Contract.Requires <ArgumentNullException>(changed != null);

            _mode              = mode;
            _changed           = changed;
            Priority           = priority;
            Value              = _directValue = PerspexProperty.UnsetValue;
            ActiveBindingIndex = -1;
            Bindings           = new LinkedList <PriorityBindingEntry>();
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PriorityLevel"/> class.
        /// </summary>
        /// <param name="priority">The priority.</param>
        /// <param name="mode">The precedence mode.</param>
        /// <param name="changed">A method to be called when the current value changes.</param>
        public PriorityLevel(
            int priority,
            LevelPrecedenceMode mode,
            Action<PriorityLevel> changed)
        {
            Contract.Requires<ArgumentNullException>(changed != null);

            _mode = mode;
            _changed = changed;
            Priority = priority;
            Value = _directValue = PerspexProperty.UnsetValue;
            ActiveBindingIndex = -1;
            Bindings = new LinkedList<PriorityBindingEntry>();
        }