bool TryGetValue(IStyleKey key, out object value) { var idx = StyleSystem.LinearIndexFor(key); value = cachedValues[idx]; return(value != null); }
public bool SetValue(IStyleKey key, object value) { var idx = StyleSystem.LinearIndexFor(key); cachedValues[idx] = null; if (elementStyle.SetValue(key, value)) { if (key.Inherit || InheritMarker.IsInheritMarker(value)) { // inherited styles are distributed to child elements, so we need to explicitly clear them all. self.InvalidateStyle(false); } self.InvalidateLayout(); return(true); } return(false); }
void Store(IStyleKey key, object value) { var idx = StyleSystem.LinearIndexFor(key); cachedValues[idx] = value; }