private static void ShowDeletePropertyChanged(BindableObject bindable, object oldValue, object newValue) { TagEditor tagEditor = bindable as TagEditor; if (tagEditor != null) { foreach (Tag curTag in tagEditor.TagLayout.Children) { curTag.ShowDelete = (bool)newValue; } } }
private static void TagsPropertyChanged(BindableObject bindable, object oldValue, object newValue) { TagEditor tagEditor = bindable as TagEditor; if (tagEditor != null) { ObservableCollection <string> tags = (ObservableCollection <string>)newValue; tags.CollectionChanged += tagEditor.Tags_CollectionChanged; tagEditor.ClearTags(); tagEditor.AddTags(tags.ToList()); } }