private static void ApplyStyle(BindableObject bindable, Style newvalue) { foreach (var setter in newvalue.Setters ) { bindable.SetValue(setter.Property, setter.Value); } }
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; }
/// <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); } }
/// <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); } }
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); }
/// <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; }
/// <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); }
public static void SetShadowOpacity(BindableObject element, float value) { element.SetValue(ShadowOpacityProperty, value); }
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); }
public static void SetRemoveHtmlTags(BindableObject view, bool value) { view?.SetValue(IsHtmlProperty, RemoveHtmlTagsProperty); }
public static void SetAttachedNullableInt(BindableObject bindable, int?value) { bindable.SetValue(AttachedNullableIntProperty, value); }
public static void SetHasCornerRadius(BindableObject element, bool tabPosition) { element.SetValue(HasCornerRadiusProperty, tabPosition); }
public static void SetInclude(BindableObject view, bool value) { view.SetValue(IncludeProperty, value); }
public static void SetShadowColor(BindableObject element, Color value) { element.SetValue(ShadowColorProperty, value); }
public static void SetShadowRadius(BindableObject element, double value) { element.SetValue(ShadowRadiusProperty, value); }
public static void SetCornerRadius(BindableObject element, double value) { element.SetValue(CornerRadiusProperty, value); }
public static void SetMyRealCell(BindableObject child, UITableViewCell value) { child.SetValue(MyRealCellProperty, value); }
public static void SetItemTapped(BindableObject bindable, ICommand value) { bindable.SetValue (CommandProperty, value); }
public static void SetBehaviors(BindableObject target, BehaviorCollection value) { target.SetValue(BehaviorsProperty, value); }
public static void SetBorderColor(BindableObject element, Color value) { element.SetValue(BorderColorProperty, value); }
public static void SetAutoRow(BindableObject bindable, AutoStepType value) { bindable.SetValue(AutoRowProperty, value); }
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); }
public static void SetRow(BindableObject view, int value) { view.SetValue(RowProperty, value); }
/// <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); }
public static void SetToolbarPlacement(BindableObject element, ToolbarPlacement toolbarPlacement) { element.SetValue(ToolbarPlacementProperty, toolbarPlacement); }
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);
public static void SetTouchUp(BindableObject bindable, ICommand value) { bindable.SetValue (TouchUpProperty, value); }
public static void SetColor(BindableObject view, Color value) { view.SetValue (ColorProperty, value); }
/// <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); }
/// <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); }
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); }
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); }
internal static void SetRealCell(BindableObject cell, UITableViewCell renderer) { cell.SetValue(RealCellProperty, renderer); }
public static void SetHasShadow(BindableObject view, bool value) { view.SetValue (HasShadowProperty, value); }
/// <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); }
public static void SetAttachedNullableInt (BindableObject bindable, int? value) { bindable.SetValue (AttachedNullableIntProperty, value); }
public static void SetAccessory(BindableObject bindableObject, AccessoryType accessoryType) => bindableObject.SetValue(AccessoryProperty, accessoryType);
public static void SetApplyStyleImmediately(BindableObject obj, bool value) { obj?.SetValue(ApplyStyleImmediatelyProperty, value); }
public static void SetIsSelectable(BindableObject bindableObject, bool isSelectable) => bindableObject.SetValue(IsSelectableProperty, isSelectable);
internal static void SetRenderer(BindableObject cell, CellRenderer renderer) { cell.SetValue(RendererProperty, renderer); }
/// <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); }
/// <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); }
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); }
/// <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); }
internal static void SetPageContext(BindableObject bindable, Context context) { bindable.SetValue(PageContextProperty, context); }