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); } }
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(); } }
/// <summary> /// Creates a new <see cref="EAttributeType.String"/> type attribute value /// </summary> public static AttributeValue From(AtomicString str) => new AttributeValue(EAttributeType.String, str, str);