Esempio n. 1
0
        public static void SetAttachedValue(Binding.BindableObject bindable, Binding.BindableProperty property, object value)
        {
            if (bindable == null)
            {
                throw new ArgumentNullException(nameof(bindable));
            }

            bindable.SetValueCore(property, value, SetValueFlags.None, SetValuePrivateFlags.ManuallySet, false);
        }
Esempio n. 2
0
        public static T GetAttachedValue <T>(Binding.BindableObject bindable, Binding.BindableProperty property)
        {
            if (bindable == null)
            {
                throw new ArgumentNullException(nameof(bindable));
            }

            return((T)bindable.GetValue(property));
        }
Esempio n. 3
0
        internal static void OnChildPropertyChanged(Binding.BindableObject bindable, object oldValue, object newValue)
        {
            // Unused parameters
            _ = oldValue;
            _ = newValue;

            View view = bindable as View;

            view?.Layout?.RequestLayout();
        }
Esempio n. 4
0
 internal static void SetChildValue(Binding.BindableObject bindable, Binding.BindableProperty property, object value)
 {
     bindable.SetValueCore(property, value, SetValueFlags.None, SetValuePrivateFlags.ManuallySet, false);
 }
Esempio n. 5
0
 static void BindingContextPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
 {
     bindable._inheritedContext = null;
     bindable.ApplyBindings(skipBindingContext: true, fromBindingContextChanged: true);
     bindable.OnBindingContextChanged();
 }
Esempio n. 6
0
 internal override bool GetState(BindableObject bindable)
 {
     return((bool)bindable.GetValue(_stateProperty));
 }
Esempio n. 7
0
 internal override void TearDown(BindableObject bindable)
 {
     bindable.ClearValue(_stateProperty);
     bindable.PropertyChanged -= OnAttachedObjectPropertyChanged;
 }