1 write to Element
Microsoft.Maui.Controls.Compatibility (1)
iOS\VisualElementRenderer.cs (1)
178 Element = element;
508 references to Element
Microsoft.Maui.Controls.Compatibility (508)
iOS\CollectionView\CarouselViewRenderer.cs (1)
10 CarouselView Carousel => Element;
iOS\CollectionView\ItemsViewRenderer.cs (5)
19 protected TItemsView ItemsView => Element; 139 if (Element == null) 180 switch (Element.VerticalScrollBarVisibility) 199 switch (Element.HorizontalScrollBarVisibility) 239 TearDownOldElement(Element);
iOS\NativeViewWrapperRenderer.cs (8)
26 if (Element?.GetDesiredSizeDelegate == null) 30 var result = Element.GetDesiredSizeDelegate(this, widthConstraint, heightConstraint); 40 if (Element?.LayoutSubViews == null) 42 ((IVisualElementController)Element)?.InvalidateMeasure(InvalidationTrigger.MeasureChanged); 48 var handled = Element.LayoutSubViews(); 59 if (Element?.SizeThatFitsDelegate == null) 63 var result = Element.SizeThatFitsDelegate(size); 95 SetNativeControl(Element.NativeView);
iOS\Platform.cs (1)
618 if (UserInteractionEnabled && Element is Layout layout && !layout.CascadeInputTransparent)
iOS\Renderers\ActivityIndicatorRenderer.cs (5)
80 Control.Color = Element.Color == null ? null : Element.Color.ToPlatform(); 89 if (Element.IsRunning) 97 if (Control != null && !Control.IsAnimating && Element != null && Element.IsRunning)
iOS\Renderers\BoxRenderer.cs (16)
55 if (Element != null && _previousSize != Bounds.Size) 57 SetBackground(Element.Background); 68 if (Element != null) 70 SetBackground(Element.Background); 79 SetBackground(Element.Background); 82 else if (e.PropertyName == VisualElement.IsVisibleProperty.PropertyName && Element.IsVisible) 88 if (Element == null) 91 var elementColor = Element.Color; 103 if (Element == null) 107 brush = Element.Background; 111 SetBackgroundColor(Element.BackgroundColor); 129 if (Element == null) 132 var elementCornerRadius = Element.CornerRadius; 153 if (Element != null) 155 var heightRequest = Element.HeightRequest; 156 var widthRequest = Element.WidthRequest;
iOS\Renderers\ButtonRenderer.cs (11)
85 if (Element != null && _previousSize != Bounds.Size) 87 Brush brush = Element.Background; 155 var elemValue = (string)Element?.GetValue(AutomationProperties.NameProperty); 167 UIColor backgroundColor = Element.BackgroundColor == null ? null : Element.BackgroundColor.ToPlatform(); 195 ButtonElementManager.OnButtonTouchUpInside(this.Element); 200 ButtonElementManager.OnButtonTouchUpOutside(this.Element); 205 ButtonElementManager.OnButtonTouchDown(this.Element); 211 Control.TitleLabel.Font = Element.ToUIFont(); 221 if (Element.TextColor == null) 229 var color = Element.TextColor.ToPlatform();
iOS\Renderers\CheckBoxRendererBase.cs (7)
37 var elemValue = (string)Element?.GetValue(AutomationProperties.NameProperty); 118 Control.IsChecked = Element.IsChecked; 119 Control.IsEnabled = Element.IsEnabled; 131 if (Element == null) 134 Control.CheckBoxTintColor = Element.Color; 140 Element.IsChecked = Control.IsChecked; 145 Control.IsChecked = Element.IsChecked;
iOS\Renderers\DatePickerRenderer.cs (19)
56 IElementController ElementController => Element as IElementController; 158 if (Element.OnThisPlatform().UpdateMode() == UpdateMode.Immediately) 179 if (_picker.Date.ToDateTime().Date != Element.Date.Date) 180 _picker.SetDate(Element.Date.ToNSDate(), animate); 183 if (string.IsNullOrWhiteSpace(Element.Format) || Element.Format.Equals("d", StringComparison.OrdinalIgnoreCase)) 188 if (Element.Format?.Equals("D", StringComparison.Ordinal) == true) 201 else if (Element.Format.Contains('/', StringComparison.Ordinal)) 203 Control.Text = Element.Date.ToString(Element.Format, CultureInfo.InvariantCulture); 207 Control.Text = Element.Date.ToString(Element.Format); 219 (Control as UITextField).UpdateTextAlignment(Element); 225 Control.Font = Element.ToUIFont(); 231 var textAttr = Control.AttributedText.WithCharacterSpacing(Element.CharacterSpacing); 240 _picker.MaximumDate = Element.MaximumDate.ToNSDate(); 246 _picker.MinimumDate = Element.MinimumDate.ToNSDate(); 252 var textColor = Element.TextColor; 254 if (textColor == null || (!Element.IsEnabled && _useLegacyColorManagement))
iOS\Renderers\EditorRenderer.cs (32)
68 _placeholderLabel.Font = Element.ToUIFont(); 74 _placeholderLabel.Text = Element.Placeholder; 82 var textAttr = TextView.AttributedText.WithCharacterSpacing(Element.CharacterSpacing); 87 var placeHolder = _placeholderLabel.AttributedText.WithCharacterSpacing(Element.CharacterSpacing); 96 Color placeholderColor = Element.PlaceholderColor; 127 _placeholderLabel.AttributedText = _placeholderLabel.AttributedText.WithCharacterSpacing(Element.CharacterSpacing); 142 IEditorController ElementController => Element; 223 if (Element.AutoSize == EditorAutoSizeOption.TextChanges) 280 if (Element.AutoSize == EditorAutoSizeOption.TextChanges) 289 if (TextView.Text != Element.Text) 292 Element.SetValue(VisualElement.IsFocusedPropertyKey, false); 304 TextView.Editable = Element.IsEnabled; 305 TextView.UserInteractionEnabled = Element.IsEnabled; 308 TextView.InputAccessoryView.Hidden = !Element.IsEnabled; 314 var font = Element.ToUIFont(); 321 var keyboard = Element.Keyboard; 325 if (Element.IsSet(Microsoft.Maui.Controls.InputView.IsSpellCheckEnabledProperty)) 327 if (!Element.IsSpellCheckEnabled) 332 if (Element.IsSet(Editor.IsTextPredictionEnabledProperty)) 334 if (!Element.IsTextPredictionEnabled) 346 var text = Element.UpdateFormsText(Element.Text, Element.TextTransform); 362 TextView.UpdateTextAlignment(Element); 367 => TextView.TextColor = Element.TextColor?.ToPlatform() ?? ColorExtensions.LabelColor; 374 if (currentControlText.Length > Element.MaxLength) 375 TextView.Text = currentControlText.Substring(0, Element.MaxLength); 382 return newLength <= Element.MaxLength; 388 TextView.UserInteractionEnabled = !Element.IsReadOnly; 391 Control.UserInteractionEnabled = !Element.IsReadOnly; 396 if (Element.IsEnabled && Element.IsReadOnly)
iOS\Renderers\EntryRenderer.cs (50)
75 IElementController ElementController => Element as IElementController; 133 _cursorPositionChangePending = Element.IsSet(Entry.CursorPositionProperty); 134 _selectionLengthChangePending = Element.IsSet(Entry.SelectionLengthProperty); 156 if (Element.ClearButtonVisibility != ClearButtonVisibility.Never) 244 var entryText = Element.Text ?? string.Empty; 257 ((IEntryController)Element).SendCompleted(); 265 Control.TextAlignment = Element.HorizontalTextAlignment.ToPlatformTextAlignment(((IVisualElementController)Element).EffectiveFlowDirection); 271 Control.VerticalAlignment = Element.VerticalTextAlignment.ToPlatformTextAlignment(); 277 var textColor = Element.TextColor; 281 Control.TextColor = textColor == null || !Element.IsEnabled ? _defaultTextColor : textColor.ToPlatform(); 292 Control.AdjustsFontSizeToFitWidth = Element.OnThisPlatform().AdjustsFontSizeToFitWidth(); 306 Control.Font = Element.ToUIFont(); 311 var keyboard = Element.Keyboard; 315 if (Element.IsSet(Microsoft.Maui.Controls.InputView.IsSpellCheckEnabledProperty)) 317 if (!Element.IsSpellCheckEnabled) 322 if (Element.IsSet(Microsoft.Maui.Controls.Entry.IsTextPredictionEnabledProperty)) 324 if (!Element.IsTextPredictionEnabled) 336 if (Element.IsPassword && Control.IsFirstResponder) 340 Control.Enabled = Element.IsEnabled; 344 Control.SecureTextEntry = Element.IsPassword; 350 var formatted = (FormattedString)Element.Placeholder; 355 var targetColor = Element.PlaceholderColor; 359 var color = targetColor == null || !Element.IsEnabled ? _defaultPlaceholderColor : targetColor; 360 UpdateAttributedPlaceholder(formatted.ToNSAttributedString(Element.RequireFontManager(), defaultColor: color)); 366 UpdateAttributedPlaceholder(formatted.ToNSAttributedString(Element.RequireFontManager(), defaultColor: color)); 369 UpdateAttributedPlaceholder(Control.AttributedPlaceholder.WithCharacterSpacing(Element.CharacterSpacing)); 378 var text = Element.UpdateFormsText(Element.Text, Element.TextTransform); 387 var textAttr = Control.AttributedText.WithCharacterSpacing(Element.CharacterSpacing); 392 var placeHolder = Control.AttributedPlaceholder.WithCharacterSpacing(Element.CharacterSpacing); 403 if (currentControlText.Length > Element.MaxLength) 404 Control.Text = currentControlText.Substring(0, Element.MaxLength); 411 return newLength <= Element?.MaxLength; 417 if (Control == null || Element == null) 419 Control.ReturnKeyType = Element.ReturnType.ToUIReturnKeyType(); 424 if (_nativeSelectionIsUpdating || Control == null || Element == null) 433 if (newCursorPosition != Element.CursorPosition) 441 if (selectionLength != Element.SelectionLength) 449 if (_nativeSelectionIsUpdating || Control == null || Element == null) 461 int cursorPosition = Element.CursorPosition; 483 int selectionLength = Element.SelectionLength; 485 if (Element.IsSet(Entry.SelectionLengthProperty)) 503 if (Element.IsSet(Entry.CursorPositionProperty)) 519 if (control == null || Element == null) 522 if (Element.IsSet(Specifics.CursorColorProperty)) 524 var color = Element.OnThisPlatform().GetCursorColor(); 569 Control.UserInteractionEnabled = !Element.IsReadOnly; 575 Control.ClearButtonMode = Element.ClearButtonVisibility == ClearButtonVisibility.WhileEditing ? UITextFieldViewMode.WhileEditing : UITextFieldViewMode.Never;
iOS\Renderers\FrameRenderer.cs (9)
73 float cornerRadius = Element.CornerRadius; 81 if (Element.BackgroundColor == null) 88 _actualView.Layer.BackgroundColor = Element.BackgroundColor.ToCGColor(); 93 if (!Brush.IsNullOrEmpty(Element.Background)) 95 var backgroundLayer = this.GetBackgroundLayer(Element.Background); 105 if (Element.BorderColor == null) 109 _actualView.Layer.BorderColor = Element.BorderColor.ToCGColor(); 113 if (Element.HasShadow) 131 _actualView.Layer.MasksToBounds = Element.IsClippedToBounds;
iOS\Renderers\ImageButtonRenderer.cs (7)
70 await ImageElementManager.SetImage(this, Element).ConfigureAwait(false); 104 (float)(Element.Padding.Top), 105 (float)(Element.Padding.Left), 106 (float)(Element.Padding.Bottom), 107 (float)(Element.Padding.Right) 115 await ImageElementManager.SetImage(this, Element).ConfigureAwait(false); 136 var elemValue = (string)Element?.GetValue(AutomationProperties.NameProperty);
iOS\Renderers\ImageRenderer.cs (2)
92 ((IImageController)Element)?.SetIsLoading(false); 98 await ImageElementManager.SetImage(this, Element, oldElement).ConfigureAwait(false);
iOS\Renderers\IndicatorViewRenderer.cs (15)
110 IsSquare = Element.IndicatorsShape == IndicatorShape.Square, 111 IndicatorSize = Element.IndicatorSize 124 var control = (Element.IndicatorTemplate != null) 125 ? (UIView)(Element.IndicatorLayout as VisualElement).GetRenderer() 139 if (Element.IndicatorTemplate == null) 148 UIPager.IsSquare = Element.IndicatorsShape == IndicatorShape.Square; 155 UIPager.IndicatorSize = Element.IndicatorSize; 161 if (Element.IndicatorLayout is not VisualElement indicatorLayout) 177 Element.Position = (int)UIPager.CurrentPage; 187 var position = Element.Position; 209 UIPager.HidesForSinglePage = Element.HideSingle; 217 var color = Element.IndicatorColor; 226 var color = Element.SelectedIndicatorColor; 238 var minValue = Math.Min(Element.MaximumVisible, Element.Count);
iOS\Renderers\LabelRenderer.cs (47)
77 if (widthFits || Element.LineBreakMode == LineBreakMode.NoWrap) 84 bool textCouldHaveWrapped = Element.LineBreakMode == LineBreakMode.WordWrap || Element.LineBreakMode == LineBreakMode.CharacterWrap; 113 switch (Element.VerticalTextAlignment) 116 fitSize = Control.SizeThatFits(Element.Bounds.Size.ToSizeF()); 118 Control.Frame = new RectangleF(0, 0, (nfloat)Element.Width, labelHeight); 123 Control.Frame = new RectangleF(0, 0, (nfloat)Element.Width, (nfloat)Element.Height); 132 fitSize = Control.SizeThatFits(Element.Bounds.Size.ToSizeF()); 136 yOffset = (nfloat)(Element.Height - labelHeight); 137 Control.Frame = new RectangleF(0, yOffset, (nfloat)Element.Width, labelHeight); 144 Control.RecalculateSpanPositions(Element); 153 if (Element != null) 155 Element.PropertyChanging -= ElementPropertyChanging; 246 return Element.Padding.IsEmpty ? new NativeLabel(RectangleF.Empty) : new FormsLabel(RectangleF.Empty); 264 if (Element?.TextType != TextType.Text) 275 var textDecorations = Element.TextDecorations; 316 var elemValue = (string)Element?.GetValue(AutomationProperties.NameProperty); 358 Control.TextAlignment = Element.HorizontalTextAlignment.ToPlatformTextAlignment(((IVisualElementController)Element).EffectiveFlowDirection); 368 switch (Element.LineBreakMode) 420 if (Element?.TextType != TextType.Text) 423 if (string.IsNullOrEmpty(Element.Text)) 426 var textAttr = Control.AttributedText.WithCharacterSpacing(Element.CharacterSpacing); 446 switch (Element.TextType) 461 _formatted = Element.FormattedText; 462 if (_formatted == null && Element.LineHeight >= 0) 463 _formatted = Element.Text; 471 var text = Element.UpdateFormsText(Element.Text, Element.TextTransform); 485 Control.AttributedText = _formatted.ToNSAttributedString(Element.RequireFontManager()); 499 string text = Element.Text ?? string.Empty; 552 if (Element == null) 563 if (Element.TextType == TextType.Html && FontIsDefault(Element)) 571 Control.Font = Element.ToUIFont(); 587 var textColor = (Color)Element.GetValue(Label.TextColorProperty); 589 if (textColor == null && Element.TextType == TextType.Html) 619 if (Element.MaxLines >= 0) 622 Control.Lines = Element.MaxLines; 634 switch (Element.LineBreakMode) 674 if (Element.Padding.IsEmpty) 686 (float)Element.Padding.Top, 687 (float)Element.Padding.Left, 688 (float)Element.Padding.Bottom, 689 (float)Element.Padding.Right);
iOS\Renderers\ListViewRenderer.cs (24)
36 ListView ListView => Element; 37 ITemplatedItemsView<Cell> TemplatedItemsView => Element; 147 var backgroundLayer = _backgroundUIView.GetBackgroundLayer(Element.Background); 192 if (Element != null) 331 Control.Source = _dataSource = Element.HasUnevenRows ? new UnevenListViewDataSource(_dataSource) : new ListViewDataSource(_dataSource); 445 if (Element.IsGroupingEnabled) 563 var refreshing = Element.IsRefreshing; 579 var groupReset = resetWhenGrouped && Element.IsGroupingEnabled; 583 if (!groupReset && Element.CachingStrategy == ListViewCachingStrategy.RetainElement) 650 if (Element.OnThisPlatform().RowAnimationsEnabled()) 665 if (Element.OnThisPlatform().RowAnimationsEnabled()) 692 if (Element.OnThisPlatform().RowAnimationsEnabled()) 707 if (Element.OnThisPlatform().RowAnimationsEnabled()) 715 if (Element.OnThisPlatform().RowAnimationsEnabled()) 730 var isPullToRequestEnabled = Element.IsPullToRefreshEnabled && ListView.RefreshAllowed; 737 var rowHeight = Element.RowHeight; 739 if (Element.HasUnevenRows && rowHeight == -1) 747 var color = Element.SeparatorColor; 753 var visibility = Element.SeparatorVisibility; 769 if (Element.SelectionMode == ListViewSelectionMode.None) 771 Element.SelectedItem = null; 780 var color = Element.RefreshControlColor; 791 switch (Element.VerticalScrollBarVisibility) 810 switch (Element.HorizontalScrollBarVisibility)
iOS\Renderers\PickerRenderer.cs (32)
57 IElementController ElementController => Element as IElementController; 93 if (s.SelectedIndex == -1 && Element.Items != null && Element.Items.Count > 0) 165 var selectedIndex = Element.SelectedIndex; 166 var items = Element.Items; 201 var textAttr = Control.AttributedText.WithCharacterSpacing(Element.CharacterSpacing); 206 var placeHolder = Control.AttributedPlaceholder.WithCharacterSpacing(Element.CharacterSpacing); 215 Control.Font = Element.ToUIFont(); 221 var formatted = (FormattedString)Element.Title; 226 var targetColor = Element.TitleColor; 230 var color = targetColor == null || !Element.IsEnabled ? _defaultPlaceholderColor : targetColor; 231 UpdateAttributedPlaceholder(formatted.ToNSAttributedString(Element.RequireFontManager(), defaultColor: color)); 237 UpdateAttributedPlaceholder(formatted.ToNSAttributedString(Element.RequireFontManager(), defaultColor: color)); 240 UpdateAttributedPlaceholder(Control.AttributedPlaceholder.WithCharacterSpacing(Element.CharacterSpacing)); 249 var selectedIndex = Element.SelectedIndex; 250 var items = Element.Items; 267 if (Element != null) 279 ((IVisualElementController)Element).PlatformSizeChanged(); 287 source.SelectedItem = formsIndex >= 0 ? Element.Items[formsIndex] : null; 294 Control.TextAlignment = Element.HorizontalTextAlignment.ToPlatformTextAlignment(((IVisualElementController)Element).EffectiveFlowDirection); 298 Control.VerticalAlignment = Element.VerticalTextAlignment.ToPlatformTextAlignment(); 304 var textColor = Element.TextColor; 306 if (textColor == null || (!Element.IsEnabled && _useLegacyColorManagement)) 346 if (Element != null) 347 ((INotifyCollectionChanged)Element.Items).CollectionChanged -= RowsCollectionChanged; 375 return _renderer.Element.Items != null ? _renderer.Element.Items.Count : 0; 380 return _renderer.Element.Items[(int)row]; 385 if (_renderer.Element.Items.Count == 0) 392 SelectedItem = _renderer.Element.Items[(int)row]; 396 if (_renderer.Element.On<PlatformConfiguration.iOS>().UpdateMode() == UpdateMode.Immediately)
iOS\Renderers\ProgressBarRenderer.cs (3)
65 Control.ProgressTintColor = Element.ProgressColor == null ? null : Element.ProgressColor.ToPlatform(); 71 Control.Progress = (float)Element.Progress;
iOS\Renderers\RefreshViewRenderer.cs (11)
29 if (Element != null && Element.IsRefreshing != _isRefreshing) 30 Element.SetValueFromRenderer(RefreshView.IsRefreshingProperty, _isRefreshing); 58 if (e.OldElement != null || Element == null) 228 if (Element == null || _refreshControl == null) 231 if (Element.RefreshColor != null) 232 _refreshControl.TintColor = Element.RefreshColor.ToPlatform(); 234 SetBackgroundColor(Element.BackgroundColor); 235 SetBackground(Element.Background); 240 IsRefreshing = Element.IsRefreshing; 245 bool isRefreshViewEnabled = Element.IsEnabled;
iOS\Renderers\SearchBarRenderer.cs (33)
31 IElementController ElementController => Element as IElementController; 185 size.Width = (nfloat)(Element?.Parent is VisualElement parent ? parent.Width : DeviceDisplay.MainDisplayInfo.GetScaledScreenSize().Width); 226 Element?.OnSearchButtonPressed(); 246 _textField.AttributedText = _textField.AttributedText.WithCharacterSpacing(Element.CharacterSpacing); 247 _textField.AttributedPlaceholder = _textField.AttributedPlaceholder.WithCharacterSpacing(Element.CharacterSpacing); 258 _textField.TextAlignment = Element.HorizontalTextAlignment.ToPlatformTextAlignment(((IVisualElementController)Element).EffectiveFlowDirection); 269 _textField.VerticalAlignment = Element.VerticalTextAlignment.ToPlatformTextAlignment(); 283 if (Element.CancelButtonColor == null) 291 cancelButton.SetTitleColor(Element.CancelButtonColor.ToPlatform(), UIControlState.Normal); 292 cancelButton.SetTitleColor(Element.CancelButtonColor.ToPlatform(), UIControlState.Highlighted); 300 cancelButton.SetTitleColor(Element.CancelButtonColor.ToPlatform(), UIControlState.Disabled); 313 _textField.Font = Element.ToUIFont(); 319 Control.UserInteractionEnabled = Element.IsEnabled; 328 var formatted = (FormattedString)Element.Placeholder ?? string.Empty; 329 var targetColor = Element.PlaceholderColor; 336 var color = Element.IsEnabled && targetColor != null 339 _textField.AttributedPlaceholder = formatted.ToNSAttributedString(Element.RequireFontManager(), defaultColor: color); 340 _textField.AttributedPlaceholder.WithCharacterSpacing(Element.CharacterSpacing); 345 _textField.AttributedPlaceholder = formatted.ToNSAttributedString(Element.RequireFontManager(), defaultColor: targetColor ?? ColorExtensions.PlaceholderColor.ToColor()); 346 _textField.AttributedPlaceholder.WithCharacterSpacing(Element.CharacterSpacing); 360 Control.Text = Element.UpdateFormsText(Element.Text, Element.TextTransform); 377 var targetColor = Element.TextColor; 381 var color = Element.IsEnabled && targetColor != null ? targetColor : _defaultTextColor.ToColor(); 394 if (currentControlText.Length > Element.MaxLength) 395 Control.Text = currentControlText.Substring(0, Element.MaxLength); 401 return newLength <= Element?.MaxLength; 407 var keyboard = Element.Keyboard; 411 if (Element.IsSet(Microsoft.Maui.Controls.InputView.IsSpellCheckEnabledProperty)) 413 if (!Element.IsSpellCheckEnabled) 449 Control.SearchBarStyle = Element.OnThisPlatform().GetSearchBarStyle().ToPlatformSearchBarStyle();
iOS\Renderers\SliderRenderer.cs (22)
99 var thumbImage = Element.ThumbImageSource; 113 if (Element != null) 115 if (Element.MinimumTrackColor == null) 118 Control.MinimumTrackTintColor = Element.MinimumTrackColor.ToPlatform(); 125 if (Element != null) 127 if (Element.MaximumTrackColor == null) 130 Control.MaximumTrackTintColor = Element.MaximumTrackColor.ToPlatform(); 137 if (Element != null) 139 if (Element.ThumbColor == null) 142 Control.ThumbTintColor = Element.ThumbColor.ToPlatform(); 152 ((IVisualElementController)Element).PlatformSizeChanged(); 181 ((IElementController)Element).SetValueFromRenderer(Slider.ValueProperty, Control.Value); 187 ((ISliderController)Element)?.SendDragStarted(); 193 ((ISliderController)Element)?.SendDragCompleted(); 198 if (Element != null && Element.IsSet(Specifics.UpdateOnTapProperty)) 200 if (Element.OnThisPlatform().GetUpdateOnTap()) 211 Element.SetValueFromRenderer(Slider.ValueProperty, val); 232 Control.MaxValue = (float)Element.Maximum; 238 Control.MinValue = (float)Element.Minimum; 244 if ((float)Element.Value != Control.Value) 245 Control.Value = (float)Element.Value;
iOS\Renderers\StepperRenderer.cs (6)
74 ((IElementController)Element).SetValueFromRenderer(Stepper.ValueProperty, Control.Value); 80 Control.StepValue = Element.Increment; 86 Control.MaximumValue = Element.Maximum; 92 Control.MinimumValue = Element.Minimum; 98 if (Control.Value != Element.Value) 99 Control.Value = Element.Value;
iOS\Renderers\SwipeViewRenderer.cs (32)
118 _scrollParent = Element.FindParentOfType<ScrollView>(); 126 _scrollParent = Element.FindParentOfType<ListView>(); 134 _scrollParent = Element.FindParentOfType<CollectionView>(); 168 if (Element.BackgroundColor != null) 169 BackgroundColor = Element.BackgroundColor.ToPlatform(); 176 Brush background = Element.Background; 219 if (Element != null) 221 Element.OpenRequested -= OnOpenRequested; 222 Element.CloseRequested -= OnCloseRequested; 224 if (Element.Content != null) 225 Element.Content.PropertyChanged -= OnContentPropertyChanged; 328 if (Element.Content == null) 335 Element.Content.PropertyChanged += OnContentPropertyChanged; 425 _isSwipeEnabled = Element.IsEnabled; 427 var isContentEnabled = Element.Content.IsEnabled; 645 if (Element.IsSet(Specifics.SwipeTransitionModeProperty)) 646 _swipeTransitionMode = Element.OnThisPlatform().GetSwipeTransitionMode(); 870 swipeItems = Element.RightItems; 873 swipeItems = Element.LeftItems; 876 swipeItems = Element.BottomItems; 879 swipeItems = Element.TopItems; 928 actionSize = Element.RightItems.Count * SwipeItemWidth; 933 actionSize = Element.LeftItems.Count * SwipeItemWidth; 1166 actionSize = Element.RightItems.Count * SwipeItemWidth; 1171 actionSize = Element.LeftItems.Count * SwipeItemWidth; 1211 var threshold = Element?.Threshold; 1304 double threshold = Element.Threshold; 1500 if (Element == null) 1503 ((ISwipeViewController)Element).IsOpen = isOpen; 1609 ((ISwipeViewController)Element).SendSwipeStarted(swipeStartedEventArgs); 1618 ((ISwipeViewController)Element).SendSwipeChanging(swipeChangingEventArgs); 1634 ((ISwipeViewController)Element).SendSwipeEnded(swipeEndedEventArgs);
iOS\Renderers\SwitchRenderer.cs (8)
48 Control.On = Element.IsToggled; 60 if (Element != null) 62 if (Element.OnColor == null) 65 Control.OnTintColor = Element.OnColor.ToPlatform(); 72 if (Element == null) 75 Color thumbColor = Element.ThumbColor; 82 ((IElementController)Element).SetValueFromRenderer(Switch.IsToggledProperty, Control.On); 87 Control.SetState(Element.IsToggled, true);
iOS\Renderers\TableViewRenderer.cs (9)
68 return new UITableView(RectangleF.Empty, GetTableViewStyle(Element?.Intent ?? TableIntent.Data)); 127 if (Element.Opacity < 1) 152 var modeledView = Element; 158 Control.BackgroundView = Element.BackgroundColor == null ? _originalBackgroundView : null; 159 Control.BackgroundView.UpdateBackground(Element.Background); 164 var rowHeight = Element.RowHeight; 165 if (Element.HasUnevenRows && rowHeight == -1) 175 var rowHeight = Element.RowHeight; 176 if (Element.HasUnevenRows && rowHeight == -1)
iOS\Renderers\TimePickerRenderer.cs (15)
42 IElementController ElementController => Element as IElementController; 177 if (Element.OnThisPlatform().UpdateMode() == UpdateMode.Immediately) 185 (Control as UITextField).UpdateTextAlignment(Element); 191 Control.Font = Element.ToUIFont(); 197 var textColor = Element.TextColor; 199 if (textColor == null || (!Element.IsEnabled && _useLegacyColorManagement)) 211 var textAttr = Control.AttributedText.WithCharacterSpacing(Element.CharacterSpacing); 220 _picker.Date = new DateTime(1, 1, 1).Add(Element.Time).ToNSDate(); 227 if (String.IsNullOrEmpty(Element.Format)) 231 Control.Text = DateTime.Today.Add(Element.Time).ToString(timeformat, cultureInfos); 236 Control.Text = DateTime.Today.Add(Element.Time).ToString(Element.Format, cultureInfos); 239 if (Element.Format?.Contains('H', StringComparison.Ordinal) == true) 245 else if (Element.Format?.Contains('h', StringComparison.Ordinal) == true) 251 Element.InvalidateMeasureNonVirtual(Controls.Internals.InvalidationTrigger.MeasureChanged);
iOS\Shapes\LineRenderer.cs (4)
57 Control.UpdateX1(Element.X1); 62 Control.UpdateY1(Element.Y1); 67 Control.UpdateX2(Element.X2); 72 Control.UpdateY2(Element.Y2);
iOS\Shapes\PathRenderer.cs (2)
46 Control.UpdatePath(Element.Data.ToCGPath(Element.RenderTransform));
iOS\Shapes\PolygonRenderer.cs (2)
72 _points = Element.Points; 81 Control.UpdateFillMode(Element.FillRule == FillRule.Nonzero);
iOS\Shapes\PolylineRenderer.cs (2)
69 _points = Element.Points; 78 Control.UpdateFillMode(Element.FillRule == FillRule.Nonzero);
iOS\Shapes\RectangleRenderer.cs (6)
56 if (Element.Width > 0) 58 var radiusX = ValidateRadius(Element.RadiusX / Element.Width); 65 if (Element.Height > 0) 67 var radiusY = ValidateRadius(Element.RadiusY / Element.Height);
iOS\Shapes\ShapeRenderer.cs (24)
47 _height = Element.Height; 48 _width = Element.Width; 61 _height = Element.Height; 66 _width = Element.Width; 101 Control.ShapeLayer.UpdateAspect(Element.Aspect); 111 Control.ShapeLayer.UpdateFill(Element.Fill); 116 Control.ShapeLayer.UpdateStroke(Element.Stroke); 121 Control.ShapeLayer.UpdateStrokeThickness(Element.StrokeThickness); 126 if (Element.StrokeDashArray == null || Element.StrokeDashArray.Count == 0) 133 if (Element.StrokeDashArray.Count % 2 == 0) 135 array = new double[Element.StrokeDashArray.Count]; 136 dashArray = new nfloat[Element.StrokeDashArray.Count]; 137 Element.StrokeDashArray.CopyTo(array, 0); 141 array = new double[2 * Element.StrokeDashArray.Count]; 142 dashArray = new nfloat[2 * Element.StrokeDashArray.Count]; 143 Element.StrokeDashArray.CopyTo(array, 0); 144 Element.StrokeDashArray.CopyTo(array, Element.StrokeDashArray.Count); 147 double thickness = Element.StrokeThickness; 158 Control.ShapeLayer.UpdateStrokeDashOffset((nfloat)Element.StrokeDashOffset); 163 PenLineCap lineCap = Element.StrokeLineCap; 184 PenLineJoin lineJoin = Element.StrokeLineJoin; 205 Control.ShapeLayer.UpdateStrokeMiterLimit(new nfloat(Element.StrokeMiterLimit));
iOS\ViewRenderer.cs (15)
49 private protected bool IsElementOrControlEmpty => Element == null || Control == null; 83 if (Control != null && Element != null) 84 Control.Frame = new RectangleF(0, 0, (nfloat)Element.Width, (nfloat)Element.Height); 162 SetBackgroundColor(Element.BackgroundColor); 164 SetBackground(Element.Background); 181 _defaultAccessibilityHint = Control.SetAccessibilityHint(Element, _defaultAccessibilityHint); 186 _defaultAccessibilityLabel = Control.SetAccessibilityLabel(Element, _defaultAccessibilityLabel); 191 _defaultIsAccessibilityElement = Control.SetIsAccessibilityElement(Element, _defaultIsAccessibilityElement); 195 _defaultAccessibilityElementsHidden = Control.SetAccessibilityElementsHidden(Element, _defaultAccessibilityElementsHidden); 276 if (Element.BackgroundColor != null) 277 SetBackgroundColor(Element.BackgroundColor); 285 Brush brush = Element.Background; 299 uiControl.Enabled = Element.IsEnabled; 308 Control.UpdateFlowDirection(Element);
iOS\VisualElementRenderer.cs (23)
123 if (Element != null && Element.IsSet(PlatformConfiguration.iOSSpecific.VisualElement.CanBecomeFirstResponderProperty)) 124 return PlatformConfiguration.iOSSpecific.VisualElement.GetCanBecomeFirstResponder(Element); 140 get { return Element; } 168 Layout.LayoutChildIntoBoundingRegion(Element, new Rect(Element.X, Element.Y, size.Width, size.Height)); 177 var oldElement = Element; 226 if (Element != null && !string.IsNullOrEmpty(Element.AutomationId)) 227 SetAutomationId(Element.AutomationId); 256 bool hasBackground = Element?.Background != null && !Element.Background.IsEmpty; 307 if (Element != null) 309 Element.ClearValue(Platform.RendererProperty); 332 SetBackgroundColor(Element.BackgroundColor); 334 SetBackground(Element.Background); 339 SetBlur((BlurEffectStyle)Element.GetValue(PlatformConfiguration.iOSSpecific.VisualElement.BlurEffectProperty)); 358 _defaultAccessibilityHint = this.SetAccessibilityHint(Element, _defaultAccessibilityHint); 363 _defaultAccessibilityLabel = this.SetAccessibilityLabel(Element, _defaultAccessibilityLabel); 368 _defaultIsAccessibilityElement = this.SetIsAccessibilityElement(Element, _defaultIsAccessibilityElement); 373 _defaultAccessibilityElementsHidden = this.SetAccessibilityElementsHidden(Element, _defaultAccessibilityElementsHidden); 456 var clippableLayout = Element as Layout;