private static void ApplyStyle(BindableObject bindable, Style newvalue)
 {
   foreach (var setter in newvalue.Setters )
   {
       bindable.SetValue(setter.Property, setter.Value);
   }
 }
Exemplo 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;
		}
Exemplo 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);
     }
 }
Exemplo 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);
     }
 }
Exemplo 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);
		}
Exemplo 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;
        }
Exemplo 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);
        }
Exemplo n.º 8
0
 public static void SetShadowOpacity(BindableObject element, float value)
 {
     element.SetValue(ShadowOpacityProperty, value);
 }
Exemplo 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);
 }
Exemplo n.º 11
0
 public static void SetRemoveHtmlTags(BindableObject view, bool value)
 {
     view?.SetValue(IsHtmlProperty, RemoveHtmlTagsProperty);
 }
Exemplo n.º 12
0
 public static void SetAttachedNullableInt(BindableObject bindable, int?value)
 {
     bindable.SetValue(AttachedNullableIntProperty, value);
 }
Exemplo n.º 13
0
 public static void SetHasCornerRadius(BindableObject element, bool tabPosition)
 {
     element.SetValue(HasCornerRadiusProperty, tabPosition);
 }
Exemplo n.º 14
0
 public static void SetInclude(BindableObject view, bool value)
 {
     view.SetValue(IncludeProperty, value);
 }
Exemplo n.º 15
0
 public static void SetShadowColor(BindableObject element, Color value)
 {
     element.SetValue(ShadowColorProperty, value);
 }
Exemplo n.º 16
0
 public static void SetShadowRadius(BindableObject element, double value)
 {
     element.SetValue(ShadowRadiusProperty, value);
 }
Exemplo 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);
 }
Exemplo n.º 19
0
		public static void SetItemTapped(BindableObject bindable, ICommand value)
		{
			bindable.SetValue (CommandProperty, value);
		}
Exemplo n.º 20
0
 public static void SetBehaviors(BindableObject target, BehaviorCollection value)
 {
     target.SetValue(BehaviorsProperty, value);
 }
Exemplo n.º 21
0
 public static void SetBorderColor(BindableObject element, Color value)
 {
     element.SetValue(BorderColorProperty, value);
 }
Exemplo n.º 22
0
 public static void SetAutoRow(BindableObject bindable, AutoStepType value)
 {
     bindable.SetValue(AutoRowProperty, value);
 }
Exemplo n.º 23
0
		public static void SetBehaviors(BindableObject target, BehaviorCollection value)
		{
			target.SetValue(BehaviorsProperty, value);
		}
Exemplo n.º 24
0
 public static void SetColumn(BindableObject view, int value)
 {
     view.SetValue(ColumnProperty, value);
 }
Exemplo n.º 25
0
 public static void SetRenderer(BindableObject bindableObject, IVisualElementRenderer renderer)
 {
     var value = bindableObject.GetValue (RendererProperty);
     bindableObject.SetValue (RendererProperty, renderer);
 }
Exemplo n.º 26
0
 public static void SetRow(BindableObject view, int value)
 {
     view.SetValue(RowProperty, value);
 }
Exemplo 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);
 }
Exemplo n.º 28
0
 public static void SetToolbarPlacement(BindableObject element, ToolbarPlacement toolbarPlacement)
 {
     element.SetValue(ToolbarPlacementProperty, toolbarPlacement);
 }
Exemplo 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);
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo n.º 47
0
		public static void SetAttachedNullableInt (BindableObject bindable, int? value)
		{
			bindable.SetValue (AttachedNullableIntProperty, value);
		}
Exemplo n.º 48
0
 public static void SetAccessory(BindableObject bindableObject, AccessoryType accessoryType) =>
     bindableObject.SetValue(AccessoryProperty, accessoryType);
Exemplo n.º 49
0
 public static void SetApplyStyleImmediately(BindableObject obj, bool value)
 {
     obj?.SetValue(ApplyStyleImmediatelyProperty, value);
 }
Exemplo n.º 50
0
 public static void SetIsSelectable(BindableObject bindableObject, bool isSelectable) =>
     bindableObject.SetValue(IsSelectableProperty, isSelectable);
Exemplo n.º 51
0
		internal static void SetRenderer(BindableObject cell, CellRenderer renderer)
		{
			cell.SetValue(RendererProperty, renderer);
		}
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo n.º 60
0
 internal static void SetPageContext(BindableObject bindable, Context context)
 {
     bindable.SetValue(PageContextProperty, context);
 }