public void EndResolve() { // todo This is called by the style resolver when all style rules have been applied. SweepChanges changesAfterSweep = ResolvedStyles.Sweep(); if (inheritableValuesChanged || changesAfterSweep == SweepChanges.Inherited) { // inform all child-widgets that the style has changed in a way that may affect them .. // This will clear their caches, but does not necessarily re-apply the style rules. self.InvalidateStyle(true); } if (valueChanged || changesAfterSweep != SweepChanges.None) { // inform the widget that the layout has changed. This should trigger an measure/arrange cycle. // This implicitly informs all parent widgets that they need to recompute their layouts too. self.InvalidateLayout(); } }
public SweepChanges Sweep() { SweepChanges haveChanges = SweepChanges.None; for (int i = 0; i < valuesTouched.Count; i += 1) { if (!valuesTouched[i] && values[i] != null) { values[i] = null; if (keys[i].Inherit) { haveChanges = SweepChanges.Inherited; } else if (haveChanges == SweepChanges.None) { haveChanges = SweepChanges.Local; } } valuesTouched[i] = false; } return(haveChanges); }