private void SetupItems(IList items, GradientElement parent) { foreach (var item in items) { var element = (GradientElement)item; BindableObject.SetInheritedBindingContext(element, parent?.BindingContext); element.Parent = parent; } }
internal void Release() { Parent = null; foreach (var item in Items) { BindableObject.SetInheritedBindingContext(item, null); item.Parent = null; } }
internal void AttachTo(GradientElement parent) { Parent = parent; foreach (var item in Items) { BindableObject.SetInheritedBindingContext(item, Parent?.BindingContext); item.Parent = parent; } Parent?.InvalidateCanvas(); }