/// <summary> /// Updates the <see cref="T:MvxViewBindingTag"/> data source. /// You need to call <see cref="M:IMvxViewBindingManager.BindView"/> to rebind items. /// </summary> public static void UpdateDataSource(this View view, object dataSource) { var tag = view.GetBindingTag(); if (tag == null) { tag = new MvxViewBindingTag() { DataSource = dataSource, }; view.SetBindingTag(tag); } else { tag.DataSource = dataSource; } }
/// <summary> /// Sets the binding tag for a <see cref="View"/>. /// </summary> /// /// <seealso cref="M:GetBindingTag"/> public static void SetBindingTag(this View view, MvxViewBindingTag tag) { view.SetTag (MvxAndroidBindingResource.Instance.BindingTagUnique, tag); }