void Remove(FlexItemView item) { if (item == null) { return; } item.RemoveClicked -= ItemRemoveClicked; flexBox.Children.Remove(item); }
View CreateItem() { var item = new FlexItemView { Style = Resources["DemoItemStyle"] as Style }; (item.BindingContext as FlexItemViewModel).Index = flexBox.Children.Count + 1; item.RemoveClicked += ItemRemoveClicked; return(item); }