public MvxPropertyChangedListener(INotifyPropertyChanged notificationObject)
        {
            if (notificationObject == null)
            {
                throw new ArgumentNullException("notificationObject");
            }

            _notificationObject = notificationObject;
            _token = _notificationObject.WeakSubscribe(NotificationObjectOnPropertyChanged);
        }
コード例 #2
0
        public MvxPropertyChangedListener(INotifyPropertyChanged notificationObject)
        {
            if (notificationObject == null)
            {
                throw new ArgumentNullException(nameof(notificationObject));
            }

            this._notificationObject = notificationObject;
            this._token = this._notificationObject.WeakSubscribe(this.NotificationObjectOnPropertyChanged);
        }
コード例 #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.OneImageView);
            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            SetActionBar(toolbar);
            _eventSubscriptionIsSaveImageEnabled    = ViewModel.WeakSubscribe(() => ViewModel.IsSaveImageEnabled, ActionBarChanged);
            _eventSubscriptionIsSetWallpaperEnabled = ViewModel.WeakSubscribe(() => ViewModel.IsSetWallpaperEnabled, ActionBarChanged);
        }
コード例 #4
0
        public override void SubscribeToEvents()
        {
            var formsElement = Target as Element;

            if (formsElement == null)
            {
                return;
            }

            _propertyChangedSubscription = formsElement.WeakSubscribe(OnElementPropertyChanged);
        }
コード例 #5
0
        public override void SubscribeToEvents()
        {
            var bindableObject = Target as BindableObject;

            if (bindableObject == null)
            {
                return;
            }

            _propertyChangedSubscription = bindableObject.WeakSubscribe(OnBindableObjectPropertyChanged);
        }
コード例 #6
0
 public static void SetDataContextWatcher(BindableObject d, MvxNotifyPropertyChangedEventSubscription value)
 {
     d.SetValue(BindingsListProperty, value);
 }
コード例 #7
0
 public override void OnResume()
 {
     _token = ViewModel.WeakSubscribe(ViewModelPropertyChanged);
     ViewModel.InitializeList();
     base.OnResume();
 }
コード例 #8
0
 public void Include(MvxNotifyPropertyChangedEventSubscription subsctiption)
 {
     subsctiption = new MvxNotifyPropertyChangedEventSubscription(null, null);
     subsctiption.Dispose();
 }