Exemple #1
0
            private int _index;                                     //current index

            #endregion

            #region Constructors and Destructors

            /// <summary>
            /// Initializes a new instance of the <see cref="StylizedBehaviorCollectionEnumerator"/> class.
            /// </summary>
            /// <param name="stylizedBehaviorCollection">The stylized behavior collection.</param>
            public StylizedBehaviorCollectionEnumerator(StylizedBehaviorCollection stylizedBehaviorCollection)
            {
                _behaviors = new List <System.Windows.Interactivity.Behavior> ();
                foreach (var behaviorType in stylizedBehaviorCollection._behaviorTypes)
                {
                    _behaviors.Add(Activator.CreateInstance(behaviorType) as System.Windows.Interactivity.Behavior);
                }
                _current = null;
                _index   = -1;
            }
Exemple #2
0
 /// <summary>
 /// Sets the behaviors.
 /// </summary>
 /// <param name="uie">The dependency object.</param>
 /// <param name="value">The styled value.</param>
 public static void SetBehaviors(DependencyObject uie, StylizedBehaviorCollection value)
 {
     uie.SetValue(BehaviorsProperty, value);
 }