/// <summary>
        /// Synchronizes the properties of the provided <see cref="VirtualizationStrategy" /> instance
        /// with the current definition.
        /// </summary>
        /// <param name="strategy">The <see cref="VirtualizationStrategy" /> instance which property values will
        /// be synchronized with the ones defined by this <see cref="VirtualizationStrategyDefinition" /> instance.</param>
        internal override void SynchStrategyProperties(VirtualizationStrategy strategy)
        {
            StackVirtualizationStrategy typedStrategy = strategy as StackVirtualizationStrategy;

            if (typedStrategy == null)
            {
                throw new InvalidOperationException("This virtualization strategy definition can only synch properties for " + typeof(StackVirtualizationStrategy).ToString() + " instances.");
            }

            typedStrategy.Orientation = this.Orientation;
            typedStrategy.ReorderMode = this.ReorderMode;
        }
        internal override void SynchStrategyProperties(VirtualizationStrategy strategy)
        {
            WrapVirtualizationStrategy typedStrategy = strategy as WrapVirtualizationStrategy;

            if (typedStrategy == null)
            {
                throw new InvalidOperationException("This virtualization strategy definition can only synch properties for " + typeof(WrapVirtualizationStrategy).ToString() + " instances.");
            }

            typedStrategy.Orientation       = this.Orientation;
            typedStrategy.WrapLineAlignment = this.WrapLineAlignment;
        }
Exemple #3
0
 /// <summary>
 /// Synchronizes the properties of the provided <see cref="VirtualizationStrategy"/> instance
 /// with the current definition.
 /// </summary>
 /// <param name="strategy">The <see cref="VirtualizationStrategy"/> instance which property values will
 /// be synchronized with the ones defined by this <see cref="VirtualizationStrategyDefinition"/> instance.</param>
 internal abstract void SynchStrategyProperties(VirtualizationStrategy strategy);