Пример #1
0
        ///// <summary>
        ///// Initializes the collection with the two color blend.
        ///// </summary>
        ///// <param name="collection">Collection to initialize.</param>
        ///// <param name="backColor1">Start color.</param>
        ///// <param name="backColor2">End color.</param>
        //public static void InitializeCollection(ColorBlendCollection collection, int backColor1, int backColor2)
        //{
        //    InitializeCollection(collection, ColorScheme.GetColor(backColor1), ColorScheme.GetColor(backColor2));
        //}

        /// <summary>
        /// Initializes the collection with the two color blend.
        /// </summary>
        /// <param name="collection">Collection to initialize.</param>
        /// <param name="backColor1">Start color.</param>
        /// <param name="backColor2">End color.</param>
        public static void InitializeCollection(ColorBlendCollection collection, Color backColor1, Color backColor2)
        {
            collection.Clear();
            collection.Add(new ColorStop(backColor1, 0f));
            collection.Add(new ColorStop(backColor2, 1f));
        }
Пример #2
0
 /// <summary>
 /// Adds the ColorStop objects from the collection.
 /// </summary>
 /// <param name="col">Collection to copy objects from</param>
 public void CopyFrom(ColorBlendCollection col)
 {
     foreach (ColorStop b in col)
         this.Add(b);
 }