예제 #1
0
 private void SetupItems(IList items, GradientElement parent)
 {
     foreach (var item in items)
     {
         var element = (GradientElement)item;
         BindableObject.SetInheritedBindingContext(element, parent?.BindingContext);
         element.Parent = parent;
     }
 }
예제 #2
0
        internal void Release()
        {
            Parent = null;

            foreach (var item in Items)
            {
                BindableObject.SetInheritedBindingContext(item, null);
                item.Parent = null;
            }
        }
예제 #3
0
        internal void AttachTo(GradientElement parent)
        {
            Parent = parent;

            foreach (var item in Items)
            {
                BindableObject.SetInheritedBindingContext(item, Parent?.BindingContext);
                item.Parent = parent;
            }

            Parent?.InvalidateCanvas();
        }