Beispiel #1
0
 public CssComputedStyle this[AtomicString State]
 {
     get
     {
         CssComputedStyle prop;
         if (!CssRules.TryGetValue(State, out prop))
         {
             throw new Exception(string.Format("The styling state \"{0}\" is invalid!", State));
         }
         return(prop);
     }
 }
Beispiel #2
0
        public async Task Set_State(AtomicString StateName, bool Status)
        {
            bool changes = false;

            if (Status && !ActiveStates.Contains(StateName))
            {
                ActiveStates.Add(StateName);
                changes = true;
            }
            else if (!Status && ActiveStates.Contains(StateName))
            {
                ActiveStates.Remove(StateName);
                changes = true;
            }

            if (changes)
            {
                // The element state has changed, we will need to re-cascade and then resolve the properties
                SetFlag(EPropertySystemDirtFlags.NeedsToResolveBlock);
                Cascade();
            }
        }
Beispiel #3
0
 /// <summary>
 /// Creates a new <see cref="EAttributeType.String"/> type attribute value
 /// </summary>
 public static AttributeValue From(AtomicString str) => new AttributeValue(EAttributeType.String, str, str);