private static void ApplyStyle(BindableObject bindable, Style newvalue)
 {
   foreach (var setter in newvalue.Setters )
   {
       bindable.SetValue(setter.Property, setter.Value);
   }
 }
Esempio n. 2
0
		internal override void SetUp(BindableObject bindable)
		{
			object newvalue = bindable.GetValue(Property);

			bool newState = (newvalue == Value) || (newvalue != null && newvalue.Equals(Value));
			bindable.SetValue(_stateProperty, newState);
			bindable.PropertyChanged += OnAttachedObjectPropertyChanged;
		}
Esempio n. 3
0
 /// <summary>
 /// Sets the value of corner radius.
 /// </summary>
 /// <param name="bindable">The view</param>
 /// <param name="value">The corner radius</param>
 public static void SetCornerRadius(BindableObject bindable, Thickness value)
 {
     if (value != ZeroThickness)
     {
         bindable?.SetValue(CornerRadiusProperty, value);
     }
     else
     {
         bindable?.ClearValue(CornerRadiusProperty);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Sets the value of padding.
 /// </summary>
 /// <param name="bindable">The layout</param>
 /// <param name="value">The padding</param>
 public static void SetPadding(BindableObject bindable, Thickness value)
 {
     if (value != ZeroThickness)
     {
         bindable?.SetValue(PaddingProperty, value);
     }
     else
     {
         bindable?.ClearValue(PaddingProperty);
     }
 }
Esempio n. 5
0
		void OnConditionChanged(BindableObject bindable, bool oldValue, bool newValue)
		{
			var oldState = (bool)bindable.GetValue(_aggregatedStateProperty);
			var newState = true;
			foreach (Condition condition in Conditions)
			{
				if (!condition.GetState(bindable))
				{
					newState = false;
					break;
				}
			}
			if (newState != oldState)
				bindable.SetValue(_aggregatedStateProperty, newState);
		}
Esempio n. 6
0
        /// <summary>
        /// Gets the list of pinned elements for the bindable object.
        /// </summary>
        /// <param name="bindableObject">The bindable object to get the list of pinned elements.</param>
        /// <returns>The list of pinned elements of the bindable object.</returns>
        internal static List<VisualElement> GetPinned(BindableObject bindableObject)
        {
            if (bindableObject == null)
            {
                throw new ArgumentNullException(nameof(bindableObject));
            }

            var value = bindableObject.GetValue(PinnedPropertyKey.BindableProperty) as List<VisualElement>;

            if (value == null)
            {
                value = new List<VisualElement>();
                bindableObject.SetValue(PinnedPropertyKey, value);
            }

            return value;
        }
Esempio n. 7
0
        /// <summary>
        /// Sets the position for the object.
        /// </summary>
        /// <param name="bindableObject">The bindable object to set the position for.</param>
        /// <param name="position">The position that the view should be flown out from.</param>
        /// <returns>The position that has been assigned to the given object.</returns>
        public static void SetPosition(BindableObject bindableObject, FlyoutPosition position)
        {
            if (bindableObject == null)
            {
                throw new ArgumentNullException(nameof(bindableObject));
            }

            bindableObject.SetValue(PositionProperty, position);
        }
Esempio n. 8
0
 public static void SetShadowOpacity(BindableObject element, float value)
 {
     element.SetValue(ShadowOpacityProperty, value);
 }
Esempio n. 9
0
 public static void SetDomElement(BindableObject obj, IDomElement <BindableObject, BindableProperty> value)
 {
     obj?.SetValue(DomElementProperty, value);
 }
 public static void SetItems(BindableObject bo, IEnumerable<string> value)
 {
     bo.SetValue(PickerCollection.ItemsProperty, value);
 }
Esempio n. 11
0
 public static void SetRemoveHtmlTags(BindableObject view, bool value)
 {
     view?.SetValue(IsHtmlProperty, RemoveHtmlTagsProperty);
 }
Esempio n. 12
0
 public static void SetAttachedNullableInt(BindableObject bindable, int?value)
 {
     bindable.SetValue(AttachedNullableIntProperty, value);
 }
Esempio n. 13
0
 public static void SetHasCornerRadius(BindableObject element, bool tabPosition)
 {
     element.SetValue(HasCornerRadiusProperty, tabPosition);
 }
Esempio n. 14
0
 public static void SetInclude(BindableObject view, bool value)
 {
     view.SetValue(IncludeProperty, value);
 }
Esempio n. 15
0
 public static void SetShadowColor(BindableObject element, Color value)
 {
     element.SetValue(ShadowColorProperty, value);
 }
Esempio n. 16
0
 public static void SetShadowRadius(BindableObject element, double value)
 {
     element.SetValue(ShadowRadiusProperty, value);
 }
Esempio n. 17
0
 public static void SetCornerRadius(BindableObject element, double value)
 {
     element.SetValue(CornerRadiusProperty, value);
 }
 public static void SetMyRealCell(BindableObject child, UITableViewCell value)
 {
     child.SetValue(MyRealCellProperty, value);
 }
Esempio n. 19
0
		public static void SetItemTapped(BindableObject bindable, ICommand value)
		{
			bindable.SetValue (CommandProperty, value);
		}
 public static void SetBehaviors(BindableObject target, BehaviorCollection value)
 {
     target.SetValue(BehaviorsProperty, value);
 }
Esempio n. 21
0
 public static void SetBorderColor(BindableObject element, Color value)
 {
     element.SetValue(BorderColorProperty, value);
 }
Esempio n. 22
0
 public static void SetAutoRow(BindableObject bindable, AutoStepType value)
 {
     bindable.SetValue(AutoRowProperty, value);
 }
Esempio n. 23
0
		public static void SetBehaviors(BindableObject target, BehaviorCollection value)
		{
			target.SetValue(BehaviorsProperty, value);
		}
Esempio n. 24
0
 public static void SetColumn(BindableObject view, int value)
 {
     view.SetValue(ColumnProperty, value);
 }
 public static void SetRenderer(BindableObject bindableObject, IVisualElementRenderer renderer)
 {
     var value = bindableObject.GetValue (RendererProperty);
     bindableObject.SetValue (RendererProperty, renderer);
 }
Esempio n. 26
0
 public static void SetRow(BindableObject view, int value)
 {
     view.SetValue(RowProperty, value);
 }
Esempio n. 27
0
 /// <summary>
 /// Sets the passed <see cref="T:XFGloss.Gradient"/> value as the currently assigned background gradient for
 /// the passed <see cref="T:Xamarin.Forms.BindableObject"/>.
 /// </summary>
 /// <param name="bindable">The <see cref="T:Xamarin.Forms.BindableObject"/> that the BackgroundGradient attached
 /// property value should be assigned to.</param>
 /// <param name="value">The <see cref="T:XFGloss.Gradient"/> value that should be assigned to the passed
 /// <see cref="T:Xamarin.Forms.BindableObject"/>.</param>
 public static void SetBackgroundGradient(BindableObject bindable, Gradient value)
 {
     bindable?.SetValue(BackgroundGradientProperty, value);
 }
Esempio n. 28
0
 public static void SetToolbarPlacement(BindableObject element, ToolbarPlacement toolbarPlacement)
 {
     element.SetValue(ToolbarPlacementProperty, toolbarPlacement);
 }
Esempio n. 29
0
 public static void SetShadowOffsetY(BindableObject element, double value)
 {
     element.SetValue(ShadowOffsetYProperty, value);
 }
 public static void SetAutoWireViewModel(BindableObject bindable, bool value) =>
     bindable.SetValue(AutoWireViewModelProperty, value);
 public static void SetInAccessibleTree(BindableObject view, bool value)
 {
     view.SetValue(InAccessibleTreeProperty, value);
 }
 public static void SetCellMonitor(BindableObject bindableObject, CellMonitor cellMonitor) =>
     bindableObject.SetValue(CellMonitorProperty, cellMonitor);
Esempio n. 33
0
		public static void SetTouchUp(BindableObject bindable, ICommand value)
		{
			bindable.SetValue (TouchUpProperty, value);
		}
 public static void SetColor(BindableObject view, Color value)
 {
     view.SetValue (ColorProperty, value);
 }
Esempio n. 35
0
 /// <summary>
 /// Sets the passed <see cref="T:Xamarin.Forms.Color"/> value as the currently assigned minimum track tint color
 /// for the passed <see cref="T:Xamarin.Forms.BindableObject"/>.
 /// </summary>
 /// <param name="bindable">The <see cref="T:Xamarin.Forms.BindableObject"/> that the MinTrackTintColor attached
 /// property value should be assigned to.</param>
 /// <param name="value">The <see cref="T:Xamarin.Forms.Color"/> value that should be assigned to the passed
 /// <see cref="T:Xamarin.Forms.BindableObject"/>.</param>
 public static void SetMinTrackTintColor(BindableObject bindable, Color value)
 {
     bindable?.SetValue(MinTrackTintColorProperty, value);
 }
Esempio n. 36
0
 /// <summary>
 /// Sets the passed <see cref="T:Xamarin.Forms.Color"/> value as the currently assigned thumb tint color for the
 /// Switch control's "off" position for the passed <see cref="T:Xamarin.Forms.BindableObject"/>.
 /// </summary>
 /// <param name="bindable">The <see cref="T:Xamarin.Forms.BindableObject"/> that the ThumbTintColor attached
 /// property value should be assigned to.</param>
 /// <param name="value">The <see cref="T:Xamarin.Forms.Color"/> value that should be assigned to the passed
 /// <see cref="T:Xamarin.Forms.BindableObject"/>.</param>
 public static void SetThumbTintColor(BindableObject bindable, Color value)
 {
     bindable?.SetValue(ThumbTintColorProperty, value);
 }
Esempio n. 37
0
 public static void SetIsHtml(BindableObject view, bool value)
 {
     view?.SetValue(IsHtmlProperty, value);
 }
 public static void SetSharedFactory(BindableObject bo, ImagesCache value)
 {
     bo.SetValue(ImageFactory.SharedFactoryProperty, value);
 }
 public static void SetDistanceX(BindableObject view, double value)
 {
     view.SetValue (DistanceXProperty, value);
 }
Esempio n. 40
0
 public static void SetBorderWidth(BindableObject element, double value)
 {
     element.SetValue(BorderWidthProperty, value);
 }
 public static void SetCachedSource(BindableObject bo, string value)
 {
     bo.SetValue(ImageFactory.CachedSourceProperty, value);
 }
 public static void SetDistanceY(BindableObject View, double value)
 {
     View.SetValue (DistanceYProperty, value);
 }
Esempio n. 43
0
		internal static void SetRealCell(BindableObject cell, UITableViewCell renderer)
		{
			cell.SetValue(RealCellProperty, renderer);
		}
 public static void SetHasShadow(BindableObject view, bool value)
 {
     view.SetValue (HasShadowProperty, value);
 }
Esempio n. 45
0
 /// <summary>
 /// Sets the AutowireViewModel property value.  If <c>true</c>, creates an instance of a ViewModel using a convention, and sets the associated View's <see cref="Xamarin.Forms.BindableObject.BindingContext"/> to that instance.
 /// </summary>
 /// <param name="bindable"></param>
 /// <param name="value"></param>
 public static void SetAutowireViewModel(BindableObject bindable, bool? value)
 {
     bindable.SetValue(ViewModelLocator.AutowireViewModelProperty, value);
 }
 public static void SetRadius(BindableObject view, double value)
 {
     view.SetValue (RadiusProperty, value);
 }
Esempio n. 47
0
		public static void SetAttachedNullableInt (BindableObject bindable, int? value)
		{
			bindable.SetValue (AttachedNullableIntProperty, value);
		}
 public static void SetAccessory(BindableObject bindableObject, AccessoryType accessoryType) =>
     bindableObject.SetValue(AccessoryProperty, accessoryType);
Esempio n. 49
0
 public static void SetApplyStyleImmediately(BindableObject obj, bool value)
 {
     obj?.SetValue(ApplyStyleImmediatelyProperty, value);
 }
 public static void SetIsSelectable(BindableObject bindableObject, bool isSelectable) =>
     bindableObject.SetValue(IsSelectableProperty, isSelectable);
Esempio n. 51
0
		internal static void SetRenderer(BindableObject cell, CellRenderer renderer)
		{
			cell.SetValue(RendererProperty, renderer);
		}
Esempio n. 52
0
 /// <summary>
 /// Sets the passed <see cref="T:Xamarin.Forms.Color"/> value as the currently assigned background color for
 /// the passed <see cref="T:Xamarin.Forms.BindableObject"/>.
 /// </summary>
 /// <param name="bindable">The <see cref="T:Xamarin.Forms.BindableObject"/> that the BackgroundColor attached
 /// property value should be assigned to.</param>
 /// <param name="value">The <see cref="T:Xamarin.Forms.Color"/> value that should be assigned to the passed
 /// <see cref="T:Xamarin.Forms.BindableObject"/>.</param>
 public static void SetBackgroundColor(BindableObject bindable, Color value)
 {
     bindable?.SetValue(BackgroundColorProperty, value);
 }
 public static void SetAttachBehavior(BindableObject view, bool value)
 {
     view.SetValue(AttachBehaviorProperty, value);
 }
Esempio n. 54
0
 /// <summary>
 /// Sets the passed <see cref="T:XFGloss.CellGlossAccessoryType"/> value as the currently assigned accessory type for
 /// the passed <see cref="T:Xamarin.Forms.BindableObject"/>.
 /// </summary>
 /// <param name="bindable">The <see cref="T:Xamarin.Forms.BindableObject"/> that the AccessoryType attached
 /// property value should be assigned to.</param>
 /// <param name="value">The <see cref="T:XFGloss.CellGlossAccessoryType"/> that should be assigned to the passed
 /// <see cref="T:Xamarin.Forms.BindableObject"/>.</param>
 public static void SetAccessoryType(BindableObject bindable, CellGlossAccessoryType value)
 {
     bindable?.SetValue(AccessoryTypeProperty, value);
 }
 public static void SetItemTapped(BindableObject bo, Command value)
 {
     bo.SetValue(ItemTappedProperty, value);
 }
 public static void SetAccessibilityLabel(BindableObject view, string value)
 {
     view.SetValue (AccessibilityLabelProperty, value);
 }
Esempio n. 57
0
 public static void SetAdditionalChildren(BindableObject obj, IList <BindableObject> value)
 {
     obj?.SetValue(AdditionalChildrenProperty, value);
 }
 public static void SetAccessibilityTraits(BindableObject view, AccessibilityTrait value)
 {
     view.SetValue(AccessibilityTraitsProperty, value);
 }
Esempio n. 59
0
 /// <summary>
 /// Set the value of the MaxLines property
 /// </summary>
 /// <param name="view"></param>
 /// <param name="value"></param>
 public static void SetMaxLines(BindableObject view, int value)
 {
     view?.SetValue(MaxLinesProperty, value);
 }
Esempio n. 60
0
 internal static void SetPageContext(BindableObject bindable, Context context)
 {
     bindable.SetValue(PageContextProperty, context);
 }