/// <summary>
        /// Sets color for attribute's value.
        /// </summary>
        /// <param name="value">attribute's value.</param>
        /// <param name="isVisible">The _visibility.</param>
        public void SetAttributeValueVisibility(object value, bool isVisible)
        {
            // default value for visibility is true so there is no need to store true value
            string strValue = value == null ? string.Empty : value.ToString();
            if (!Visibility.ContainsKey(strValue))
            {
                if (!isVisible)
                {
                    Visibility.Add(strValue, isVisible);
                }
            }
            else
            {
                if (isVisible)
                {
                    Visibility.Remove(strValue);
                }
                else
                {
                    Visibility[strValue] = false;
                }
            }

            // HACK
            AdvancedPropertyChangedEventArgs eventArgs = new AdvancedPropertyChangedEventArgs(this, "Visibility", new AttributeConfigurationChangeEventArgs(this, "Visibility") { Value = strValue, Visibility = isVisible });
            RaisePropertyChanged(this, eventArgs);
        }
Esempio n. 2
0
 public Keyframes()
 {
     // The minimal working file requires a visibility and offset keyframes.
     Visibility.Add(new Keyframe <bool>(0, true, Interpolation.None));
     Offset.Add(new Keyframe <int>(0, 0, Interpolation.None));
 }