public static ISourceItemBindingBuilder <TSourceItem, IEnumerable <IGrouping <object, object> > > BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] UITableViewObservableGroupedSource tableViewSource)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(tableViewSource)
                   .For(v => v.NotNull().GroupedItemsBinding()));
        }
        public static ISourceItemBindingBuilder <TSourceItem, string> BindDefault <TSourceItem>(
            this BindingSet <TSourceItem> bindingSet,
            UINavigationItem?navigationItem)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(navigationItem)
                   .For(v => v.TitleBinding()));
        }
        public static ISourceItemBindingBuilder <TSourceItem, string> BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] TextView textView)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(textView)
                   .For(v => v.NotNull().TextBinding()));
        }
        public static ISourceItemBindingBuilder <TSourceItem, string> BindDefault <TSourceItem>(
            this BindingSet <TSourceItem> bindingSet,
            UILabel?label)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(label)
                   .For(v => v.TextBinding()));
        }
        public static ISourceItemBindingBuilder <TSourceItem, int> BindDefaultValue <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] ViewPager viewPager)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(viewPager)
                   .For(v => v.NotNull().SetCurrentItemAndPageSelectedBinding()));
        }
        public static ISourceItemBindingBuilder <TSourceItem, string> BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] UISearchBar searchBar)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(searchBar)
                   .For(v => v.NotNull().TextAndTextChangedBinding()));
        }
        public static ISourceItemBindingBuilder <TSourceItem, IEnumerable <object> > BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] UICollectionViewObservablePlainSource collectionViewSource)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(collectionViewSource)
                   .For(v => v.NotNull().ItemsBinding()));
        }
        public static ISourceItemBindingBuilder <TSourceItem, nint> BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] UIPageControl pageControl,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(pageControl)
                   .For(v => v.NotNull().CurrentPageAndValueChangedBinding(trackCanExecuteCommandChanged)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, object> BindDefault <TSourceItem>(
            this BindingSet <TSourceItem> bindingSet,
            UIBarButtonItem?barButtonItem,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(barButtonItem)
                   .For(v => v.ClickedBinding(trackCanExecuteCommandChanged)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, string> BindDefault <TSourceItem>(
            this BindingSet <TSourceItem> bindingSet,
            UITextField?textField,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(textField)
                   .For(v => v.TextAndEditingChangedBinding(trackCanExecuteCommandChanged)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, nint> BindDefault <TSourceItem>(
            this BindingSet <TSourceItem> bindingSet,
            UISegmentedControl?segmentedControl,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(segmentedControl)
                   .For(v => v.SelectedSegmentAndValueChangedBinding(trackCanExecuteCommandChanged)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, string> BindDefaultValue <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] SearchView searchView,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(searchView)
                   .For(v => v.NotNull().QueryAndQueryTextChangeBinding(trackCanExecuteCommandChanged)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, bool> BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] CheckBox checkBox,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(checkBox)
                   .For(v => v.NotNull().CheckedAndCheckedChangeBinding(trackCanExecuteCommandChanged)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, float> BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] UIProgressView progressView,
            bool animated = true)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(progressView)
                   .For(v => v.NotNull().SetProgressBinding(animated)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, int> BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] BottomNavigationView bottomNavigationView,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(bottomNavigationView)
                   .For(v => v.NotNull().SelectedItemIdAndNavigationItemSelectedBinding(trackCanExecuteCommandChanged)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, object> BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] Button button,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(button)
                   .For(v => v.NotNull().ClickBinding(trackCanExecuteCommandChanged)));
        }
        /// <summary>
        /// Two way binding on <see cref="AdapterView.SetSelection(int)"/> method and <see cref="AdapterView.ItemSelected"/> event. Item position is passed as a value.
        /// </summary>
        /// <typeparam name="TSourceItem">The type of the binding set source item.</typeparam>
        /// <param name="bindingSet">The binding set to which add the binding.</param>
        /// <param name="spinner">The spinner for which create the binding. Can be <c>null</c>.</param>
        /// <param name="trackCanExecuteCommandChanged">If set to <c>true</c> then <see cref="AdapterView.Enabled"/> value will be updated based on <see cref="ICommand.CanExecute(object)"/> result.</param>
        /// <returns>The binding builder instance.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="bindingSet"/> is <c>null</c>.</exception>
        public static ISourceItemBindingBuilder <TSourceItem, int> BindDefault <TSourceItem>(
            this BindingSet <TSourceItem> bindingSet,
            Spinner?spinner,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(spinner)
                   .For(v => v.SetSelectionAndItemSelectedBinding(trackCanExecuteCommandChanged)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, string> BindDefaultValue <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] EditText editText,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(editText)
                   .For(v => v.NotNull().TextAndTextChangedBinding()));
        }
Exemple #19
0
        public static ISourceItemBindingBuilder <TSourceItem, int> BindDefault <TSourceItem>(
            this BindingSet <TSourceItem> bindingSet,
            RadioGroup?radioGroup,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(radioGroup)
                   .For(v => v.CheckAndCheckedChangeBinding(trackCanExecuteCommandChanged)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, int> BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] ViewPager viewPager,
            bool smoothScroll = true,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(viewPager)
                   .For(v => v.NotNull().SetCurrentItemAndPageSelectedBinding(smoothScroll, trackCanExecuteCommandChanged)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, bool> BindDefault <TSourceItem>(
            this BindingSet <TSourceItem> bindingSet,
            UISwitch? @switch,
            bool animated = true,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(@switch)
                   .For(v => v.SetStateAndValueChangedBinding(animated, trackCanExecuteCommandChanged)));
        }
Exemple #22
0
        public static ISourceItemBindingBuilder <TSourceItem, string> BindDefault <TSourceItem>(
            this BindingSet <TSourceItem> bindingSet,
            SearchView?searchView,
            bool submit = true,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(searchView)
                   .For(v => v.SetQueryAndQueryTextChangeBinding(submit, trackCanExecuteCommandChanged)));
        }
        public static ISourceItemBindingBuilder <TSourceItem, NSDate> BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] UIDatePicker datePicker,
            bool animated = true,
            bool trackCanExecuteCommandChanged = false)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(datePicker)
                   .For(v => v.NotNull().DateAndValueChangedBinding(animated, trackCanExecuteCommandChanged)));
        }