2 writes to Control
Microsoft.Maui.Controls.Compatibility (2)
iOS\ViewRenderer.cs (2)
126
Control
= null;
240
Control
= uiview;
467 references to Control
Microsoft.Maui.Controls.Compatibility (467)
iOS\CollectionView\ItemsViewRenderer.cs (1)
33
return
Control
.GetSizeRequest(widthConstraint, heightConstraint, 0, 0);
iOS\Renderers\ActivityIndicatorRenderer.cs (8)
52
if (
Control
== null)
80
Control
.Color = Element.Color == null ? null : Element.Color.ToPlatform();
86
if (
Control
?.Superview == null)
90
Control
.StartAnimating();
92
Control
.StopAnimating();
97
if (
Control
!= null && !
Control
.IsAnimating && Element != null && Element.IsRunning)
98
Control
.StartAnimating();
iOS\Renderers\ButtonRenderer.cs (28)
62
if (
Control
!= null)
64
Control
.TouchUpInside -= OnButtonTouchUpInside;
65
Control
.TouchUpOutside -= OnButtonTouchUpOutside;
66
Control
.TouchDown -= OnButtonTouchDown;
104
if (
Control
== null)
108
Debug.Assert(
Control
!= null, "Control != null");
114
_buttonTextColorDefaultNormal =
Control
.TitleColor(UIControlState.Normal);
115
_buttonTextColorDefaultHighlighted =
Control
.TitleColor(UIControlState.Highlighted);
116
_buttonTextColorDefaultDisabled =
Control
.TitleColor(UIControlState.Disabled);
118
Control
.TouchUpInside += OnButtonTouchUpInside;
119
Control
.TouchUpOutside += OnButtonTouchUpOutside;
120
Control
.TouchDown += OnButtonTouchDown;
156
if (string.IsNullOrWhiteSpace(elemValue) &&
Control
?.AccessibilityLabel ==
Control
?.Title(UIControlState.Normal))
164
if (
Control
== null)
180
Control
.BackgroundColor = backgroundColor;
187
Control
.SetTitleColor(UIButton.Appearance.TitleColor(uiControlState), uiControlState); // if new values are null, old values are preserved.
188
Control
.SetTitleShadowColor(UIButton.Appearance.TitleShadowColor(uiControlState), uiControlState);
189
Control
.SetBackgroundImage(UIButton.Appearance.BackgroundImageForState(uiControlState), uiControlState);
211
Control
.TitleLabel.Font = Element.ToUIFont();
216
public UIImageView GetImage() =>
Control
?.ImageView;
223
Control
.SetTitleColor(_buttonTextColorDefaultNormal, UIControlState.Normal);
224
Control
.SetTitleColor(_buttonTextColorDefaultHighlighted, UIControlState.Highlighted);
225
Control
.SetTitleColor(_buttonTextColorDefaultDisabled, UIControlState.Disabled);
231
Control
.SetTitleColor(color, UIControlState.Normal);
232
Control
.SetTitleColor(color, UIControlState.Highlighted);
233
Control
.SetTitleColor(_useLegacyColorManagement ? _buttonTextColorDefaultDisabled : color, UIControlState.Disabled);
235
Control
.TintColor = color;
iOS\Renderers\CheckBoxRendererBase.cs (13)
26
Control
.UpdateDisplay();
38
if (string.IsNullOrWhiteSpace(elemValue) &&
Control
?.AccessibilityLabel ==
Control
?.Title(UIControlState.Normal))
96
if (disposing &&
Control
!= null)
98
Control
.CheckedChanged -= OnControlCheckedChanged;
111
if (
Control
== null)
114
Control
.CheckedChanged += OnControlCheckedChanged;
117
Control
.MinimumViewSize = MinimumSize;
118
Control
.IsChecked = Element.IsChecked;
119
Control
.IsEnabled = Element.IsEnabled;
134
Control
.CheckBoxTintColor = Element.Color;
140
Element.IsChecked =
Control
.IsChecked;
145
Control
.IsChecked = Element.IsChecked;
iOS\Renderers\DatePickerRenderer.cs (16)
75
if (
Control
== null)
192
Control
.Text = strDate;
198
Control
.Text = strDate;
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);
234
Control
.AttributedText = textAttr;
255
Control
.TextColor = _defaultTextColor;
257
Control
.TextColor = textColor.ToPlatform();
260
Control
.Text =
Control
.Text;
282
if (
Control
!= null)
284
Control
.EditingDidBegin -= OnStarted;
285
Control
.EditingDidEnd -= OnEnded;
iOS\Renderers\EditorRenderer.cs (10)
34
protected override UITextView TextView =>
Control
;
103
if (
Control
== null)
108
Control
.AddSubview(_placeholderLabel);
129
Control
.AddConstraints(hConstraints);
130
Control
.AddConstraints(vConstraints);
154
if (
Control
!= null)
160
if (
Control
is IFormsUITextView formsUITextView)
176
if (
Control
== null)
220
if (
Control
is IFormsUITextView textView)
391
Control
.UserInteractionEnabled = !Element.IsReadOnly;
iOS\Renderers\EntryRenderer.cs (62)
68
var testSize = testString.GetSizeUsingAttributes(new UIStringAttributes { Font =
Control
.Font });
88
if (
Control
!= null)
90
_defaultCursorColor =
Control
.TintColor;
91
Control
.EditingDidBegin -= OnEditingBegan;
92
Control
.EditingChanged -= OnEditingChanged;
93
Control
.EditingDidEnd -= OnEditingEnded;
94
Control
.ShouldChangeCharacters -= ShouldChangeCharacters;
111
if (
Control
== null)
232
ElementController.SetValueFromRenderer(Entry.TextProperty,
Control
.Text);
243
var controlText =
Control
.Text ?? string.Empty;
256
Control
.ResignFirstResponder();
265
Control
.TextAlignment = Element.HorizontalTextAlignment.ToPlatformTextAlignment(((IVisualElementController)Element).EffectiveFlowDirection);
271
Control
.VerticalAlignment = Element.VerticalTextAlignment.ToPlatformTextAlignment();
281
Control
.TextColor = textColor == null || !Element.IsEnabled ? _defaultTextColor : textColor.ToPlatform();
285
Control
.TextColor = textColor == null ? _defaultTextColor : textColor.ToPlatform();
292
Control
.AdjustsFontSizeToFitWidth = Element.OnThisPlatform().AdjustsFontSizeToFitWidth();
302
initialSize = testString.StringSize(
Control
.Font);
306
Control
.Font = Element.ToUIFont();
312
Control
.ApplyKeyboard(keyboard);
319
Control
.SpellCheckingType = UITextSpellCheckingType.No;
326
Control
.AutocorrectionType = UITextAutocorrectionType.No;
330
Control
.ReloadInputViews();
336
if (Element.IsPassword &&
Control
.IsFirstResponder)
338
Control
.Enabled = false;
339
Control
.SecureTextEntry = true;
340
Control
.Enabled = Element.IsEnabled;
341
Control
.BecomeFirstResponder();
344
Control
.SecureTextEntry = Element.IsPassword;
369
UpdateAttributedPlaceholder(
Control
.AttributedPlaceholder.WithCharacterSpacing(Element.CharacterSpacing));
373
Control
.AttributedPlaceholder = nsAttributedString;
380
if (
Control
.Text != text)
381
Control
.Text = text;
387
var textAttr =
Control
.AttributedText.WithCharacterSpacing(Element.CharacterSpacing);
390
Control
.AttributedText = textAttr;
392
var placeHolder =
Control
.AttributedPlaceholder.WithCharacterSpacing(Element.CharacterSpacing);
401
var currentControlText =
Control
.Text;
404
Control
.Text = currentControlText.Substring(0, Element.MaxLength);
417
if (
Control
== null || Element == null)
419
Control
.ReturnKeyType = Element.ReturnType.ToUIReturnKeyType();
424
if (_nativeSelectionIsUpdating ||
Control
== null || Element == null)
427
var currentSelection =
Control
.SelectedTextRange;
432
int newCursorPosition = (int)
Control
.GetOffsetFromPosition(
Control
.BeginningOfDocument, currentSelection.Start);
439
int selectionLength = (int)
Control
.GetOffsetFromPosition(currentSelection.Start, currentSelection.End);
449
if (_nativeSelectionIsUpdating ||
Control
== null || Element == null)
457
if (
Control
.BecomeFirstResponder())
466
Control
.SelectedTextRange =
Control
.GetTextRange(start, end);
487
end =
Control
.GetPosition(start, Math.Max(startOffset, Math.Min(
Control
.Text.Length - cursorPosition, selectionLength))) ?? start;
488
endOffset = Math.Max(startOffset, (int)
Control
.GetOffsetFromPosition(
Control
.BeginningOfDocument, end));
500
UITextPosition start =
Control
.EndOfDocument;
501
startOffset =
Control
.Text.Length;
505
start =
Control
.GetPosition(
Control
.BeginningOfDocument, cursorPosition) ??
Control
.EndOfDocument;
506
startOffset = Math.Max(0, (int)
Control
.GetOffsetFromPosition(
Control
.BeginningOfDocument, start));
518
var control =
Control
;
569
Control
.UserInteractionEnabled = !Element.IsReadOnly;
575
Control
.ClearButtonMode = Element.ClearButtonVisibility == ClearButtonVisibility.WhileEditing ? UITextFieldViewMode.WhileEditing : UITextFieldViewMode.Never;
iOS\Renderers\ImageButtonRenderer.cs (10)
54
if (disposing &&
Control
!= null)
81
if (
Control
== null)
87
Debug.Assert(
Control
!= null, "Control != null");
98
var uiElement = button ??
Control
;
137
if (string.IsNullOrWhiteSpace(elemValue) &&
Control
?.AccessibilityLabel ==
Control
?.Title(UIControlState.Normal))
146
Control
.SetImage(image?.ImageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal), UIControlState.Normal);
147
Control
.HorizontalAlignment = UIControlContentHorizontalAlignment.Fill;
148
Control
.VerticalAlignment = UIControlContentVerticalAlignment.Fill;
153
return
Control
?.ImageView;
iOS\Renderers\ImageRenderer.cs (5)
37
if (
Control
!= null && (oldUIImage =
Control
.Image) != null)
53
if (
Control
== null)
101
void IImageVisualElementRenderer.SetImage(UIImage image) =>
Control
.Image = image;
105
UIImageView IImageVisualElementRenderer.GetImage() =>
Control
;
iOS\Renderers\IndicatorViewRenderer.cs (2)
17
FormsPageControl UIPager =>
Control
as FormsPageControl;
36
if (
Control
== null)
iOS\Renderers\LabelRenderer.cs (31)
108
if (
Control
== null)
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());
137
Control
.Frame = new RectangleF(0, yOffset, (nfloat)Element.Width, labelHeight);
144
Control
.RecalculateSpanPositions(Element);
172
if (
Control
== null)
268
if (!(
Control
.AttributedText?.Length > 0))
277
var newAttributedText = new NSMutableAttributedString(
Control
.AttributedText);
299
Control
.AttributedText = newAttributedText;
317
if (string.IsNullOrWhiteSpace(elemValue) &&
Control
?.AccessibilityLabel ==
Control
?.Text)
358
Control
.TextAlignment = Element.HorizontalTextAlignment.ToPlatformTextAlignment(((IVisualElementController)Element).EffectiveFlowDirection);
371
Control
.LineBreakMode = UILineBreakMode.Clip;
374
Control
.LineBreakMode = UILineBreakMode.WordWrap;
377
Control
.LineBreakMode = UILineBreakMode.CharacterWrap;
380
Control
.LineBreakMode = UILineBreakMode.HeadTruncation;
383
Control
.LineBreakMode = UILineBreakMode.MiddleTruncation;
386
Control
.LineBreakMode = UILineBreakMode.TailTruncation;
426
var textAttr =
Control
.AttributedText.WithCharacterSpacing(Element.CharacterSpacing);
429
Control
.AttributedText = textAttr;
473
Control
.Text = text;
485
Control
.AttributedText = _formatted.ToNSAttributedString(Element.RequireFontManager());
506
Control
.AttributedText = new NSAttributedString(text, attr, ref nsError);
571
Control
.Font = Element.ToUIFont();
597
Control
.TextColor = textColor.ToPlatform(Maui.Platform.ColorExtensions.LabelColor);
622
Control
.Lines = Element.MaxLines;
638
Control
.Lines = 0;
644
Control
.Lines = 1;
678
var formsLabel =
Control
as FormsLabel;
iOS\Renderers\ListViewRenderer.cs (59)
63
return
Control
.GetSizeRequest(widthConstraint, heightConstraint, DefaultRowHeight, DefaultRowHeight);
90
Control
.TableHeaderView = _headerRenderer.NativeView;
103
Control
.TableFooterView = _footerRenderer.NativeView;
123
if (
Control
== null)
133
Control
.BackgroundView = _backgroundUIView;
231
Control
?.TableHeaderView?.Dispose();
236
Control
?.TableFooterView?.Dispose();
268
if (
Control
== null)
283
_insetTracker = new KeyboardInsetTracker(_tableViewController.TableView, () =>
Control
.Window, insets =>
Control
.ContentInset =
Control
.ScrollIndicatorInsets = insets, point =>
285
var offset =
Control
.ContentOffset;
287
Control
.SetContentOffset(offset, true);
301
Control
.Source = _dataSource = e.NewElement.HasUnevenRows ? new UnevenListViewDataSource(e.NewElement, _tableViewController) : new ListViewDataSource(e.NewElement, _tableViewController);
331
Control
.Source = _dataSource = Element.HasUnevenRows ? new UnevenListViewDataSource(_dataSource) : new ListViewDataSource(_dataSource);
408
Control
.TableFooterView = _footerRenderer.NativeView;
430
Control
.TableHeaderView = _headerRenderer.NativeView;
449
Control
.ScrollToRow(NSIndexPath.FromRowSection(result.Item2, result.Item1), position, e.ShouldAnimate);
456
Control
.Layer.RemoveAllAnimations();
461
if (
Control
!= null && !_disposed)
462
Control
.ScrollToRow(NSIndexPath.FromRowSection(index, 0), position, e.ShouldAnimate);
465
Control
.ScrollToRow(NSIndexPath.FromRowSection(index, 0), position, e.ShouldAnimate);
487
Control
.TableFooterView = null;
501
Control
.TableFooterView = _footerRenderer.NativeView;
506
Control
.TableFooterView = null;
532
Control
.TableHeaderView = null;
547
Control
.TableHeaderView = _headerRenderer.NativeView;
552
Control
.TableHeaderView = null;
576
if (
Control
.IndexPathsForVisibleRows == null && e.Action != NotifyCollectionChangedAction.Reset)
585
var lastIndex =
Control
.NumberOfRowsInSection(section);
645
Control
.BeginUpdates();
646
Control
.InsertRows(GetPaths(section, newStartingIndex, newItemsCount), InsertRowsAnimation);
647
Control
.EndUpdates();
660
Control
.BeginUpdates();
661
Control
.DeleteRows(GetPaths(section, oldStartingIndex, oldItemsCount), DeleteRowsAnimation);
662
Control
.EndUpdates();
675
Control
.BeginUpdates();
687
Control
.MoveRow(NSIndexPath.FromRowSection(oldIndex, section), NSIndexPath.FromRowSection(newIndex, section));
689
Control
.EndUpdates();
702
Control
.BeginUpdates();
703
Control
.ReloadRows(GetPaths(section, oldStartingIndex, oldItemsCount), ReloadRowsAnimation);
704
Control
.EndUpdates();
716
Control
.ReloadData();
718
PerformWithoutAnimation(() => {
Control
.ReloadData(); });
740
Control
.RowHeight = UITableView.AutomaticDimension;
742
Control
.RowHeight = rowHeight <= 0 ? DefaultRowHeight : rowHeight;
748
Control
.SeparatorColor = color.ToPlatform(ColorExtensions.SeparatorColor);
757
Control
.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
760
Control
.SeparatorStyle = UITableViewCellSeparatorStyle.None;
772
var selectedIndexPath =
Control
.IndexPathForSelectedRow;
774
Control
.DeselectRow(selectedIndexPath, false);
789
_defaultVerticalScrollVisibility =
Control
.ShowsVerticalScrollIndicator;
794
Control
.ShowsVerticalScrollIndicator = true;
797
Control
.ShowsVerticalScrollIndicator = false;
800
Control
.ShowsVerticalScrollIndicator = (bool)_defaultVerticalScrollVisibility;
808
_defaultHorizontalScrollVisibility =
Control
.ShowsHorizontalScrollIndicator;
813
Control
.ShowsHorizontalScrollIndicator = true;
816
Control
.ShowsHorizontalScrollIndicator = false;
819
Control
.ShowsHorizontalScrollIndicator = (bool)_defaultHorizontalScrollVisibility;
iOS\Renderers\PickerRenderer.cs (25)
76
if (
Control
== null)
167
Control
.Text = selectedIndex == -1 || items == null ? "" : items[selectedIndex];
169
Control
.UndoManager.RemoveAllActions();
198
if (
Control
== null)
201
var textAttr =
Control
.AttributedText.WithCharacterSpacing(Element.CharacterSpacing);
204
Control
.AttributedText = textAttr;
206
var placeHolder =
Control
.AttributedPlaceholder.WithCharacterSpacing(Element.CharacterSpacing);
215
Control
.Font = Element.ToUIFont();
240
UpdateAttributedPlaceholder(
Control
.AttributedPlaceholder.WithCharacterSpacing(Element.CharacterSpacing));
244
Control
.AttributedPlaceholder = nsAttributedString;
254
var oldText =
Control
.Text;
255
Control
.Text = selectedIndex == -1 || items == null || selectedIndex >= items.Count ? "" : items[selectedIndex];
269
var oldText =
Control
.Text;
270
Control
.Text = s.SelectedItem;
278
if (oldText !=
Control
.Text)
294
Control
.TextAlignment = Element.HorizontalTextAlignment.ToPlatformTextAlignment(((IVisualElementController)Element).EffectiveFlowDirection);
298
Control
.VerticalAlignment = Element.VerticalTextAlignment.ToPlatformTextAlignment();
307
Control
.TextColor = _defaultTextColor;
309
Control
.TextColor = textColor.ToPlatform();
312
Control
.Text =
Control
.Text;
339
if (
Control
!= null)
341
Control
.EditingDidBegin -= OnStarted;
342
Control
.EditingDidEnd -= OnEnded;
343
Control
.EditingChanged -= OnEditing;
iOS\Renderers\ProgressBarRenderer.cs (5)
32
if (
Control
== null)
56
if (
Control
== null)
59
Control
.TrackTintColor = color != null ? color.ToPlatform() : null;
65
Control
.ProgressTintColor = Element.ProgressColor == null ? null : Element.ProgressColor.ToPlatform();
71
Control
.Progress = (float)Element.Progress;
iOS\Renderers\RefreshViewRenderer.cs (2)
63
if (
Control
== null)
115
if (disposing &&
Control
!= null)
iOS\Renderers\SearchBarRenderer.cs (41)
44
if (
Control
!= null)
46
Control
.CancelButtonClicked -= OnCancelClicked;
47
Control
.SearchButtonClicked -= OnSearchButtonClicked;
48
Control
.TextChanged -= OnTextChanged;
49
Control
.ShouldChangeTextInRange -= ShouldChangeText;
51
Control
.OnEditingStarted -= OnEditingEnded;
52
Control
.OnEditingStopped -= OnEditingStarted;
64
if (
Control
== null)
75
_textField = _textField ??
Control
.FindDescendantView<UITextField>();
78
Control
.CancelButtonClicked += OnCancelClicked;
79
Control
.SearchButtonClicked += OnSearchButtonClicked;
80
Control
.TextChanged += OnTextChanged;
81
Control
.ShouldChangeTextInRange += ShouldChangeText;
83
Control
.OnEditingStarted += OnEditingStarted;
84
Control
.OnEditingStopped += OnEditingEnded;
154
if (
Control
== null)
159
_defaultTintColor =
Control
.BarTintColor;
162
Control
.BarTintColor = color.ToPlatform(_defaultTintColor);
164
Control
.SetBackgroundImage(new UIImage(), UIBarPosition.Any, UIBarMetrics.Default);
175
if (
Control
== null)
179
Control
.BarTintColor = solidColorBrush.Color.ToPlatform(_defaultTintColor);
187
var sizeThatFits =
Control
.SizeThatFits(size);
211
Control
.ResignFirstResponder();
227
Control
?.ResignFirstResponder();
242
_textField = _textField ??
Control
.FindDescendantView<UITextField>();
253
_textField = _textField ??
Control
.FindDescendantView<UITextField>();
264
_textField = _textField ??
Control
.FindDescendantView<UITextField>();
274
Control
.ShowsCancelButton = !string.IsNullOrEmpty(
Control
.Text);
278
var cancelButton =
Control
.FindDescendantView<UIButton>();
308
_textField = _textField ??
Control
.FindDescendantView<UITextField>();
319
Control
.UserInteractionEnabled = Element.IsEnabled;
360
Control
.Text = Element.UpdateFormsText(Element.Text, Element.TextTransform);
392
var currentControlText =
Control
.Text;
395
Control
.Text = currentControlText.Substring(0, Element.MaxLength);
408
Control
.ApplyKeyboard(keyboard);
415
Control
.SpellCheckingType = UITextSpellCheckingType.No;
424
Control
.InputAccessoryView = _numericAccessoryView;
428
Control
.InputAccessoryView = null;
431
Control
.ReloadInputViews();
449
Control
.SearchBarStyle = Element.OnThisPlatform().GetSearchBarStyle().ToPlatformSearchBarStyle();
iOS\Renderers\SliderRenderer.cs (29)
42
if (
Control
!= null)
44
Control
.ValueChanged -= OnControlValueChanged;
47
Control
.RemoveGestureRecognizer(_sliderTapRecognizer);
51
Control
.RemoveTarget(OnTouchDownControlEvent, UIControlEvent.TouchDown);
52
Control
.RemoveTarget(OnTouchUpControlEvent, UIControlEvent.TouchUpInside | UIControlEvent.TouchUpOutside);
63
if (
Control
== null)
66
Control
.ValueChanged += OnControlValueChanged;
70
Control
.SizeToFit();
71
_fitSize =
Control
.Bounds.Size;
73
defaultmintrackcolor =
Control
.MinimumTrackTintColor;
74
defaultmaxtrackcolor =
Control
.MaximumTrackTintColor;
75
defaultthumbcolor =
Control
.ThumbTintColor;
81
Control
.AddTarget(OnTouchDownControlEvent, UIControlEvent.TouchDown);
82
Control
.AddTarget(OnTouchUpControlEvent, UIControlEvent.TouchUpInside | UIControlEvent.TouchUpOutside);
116
Control
.MinimumTrackTintColor = defaultmintrackcolor;
118
Control
.MinimumTrackTintColor = Element.MinimumTrackColor.ToPlatform();
128
Control
.MaximumTrackTintColor = defaultmaxtrackcolor;
130
Control
.MaximumTrackTintColor = Element.MaximumTrackColor.ToPlatform();
140
Control
.ThumbTintColor = defaultthumbcolor;
142
Control
.ThumbTintColor = Element.ThumbColor.ToPlatform();
150
Control
?.SetThumbImage(uiimage, UIControlState.Normal);
181
((IElementController)Element).SetValueFromRenderer(Slider.ValueProperty,
Control
.Value);
206
var control =
Control
;
214
Control
.AddGestureRecognizer(_sliderTapRecognizer);
221
Control
.RemoveGestureRecognizer(_sliderTapRecognizer);
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 (10)
31
if (
Control
!= null)
32
Control
.ValueChanged -= OnValueChanged;
42
if (
Control
== null)
45
Control
.ValueChanged += OnValueChanged;
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 (5)
88
if (
Control
== null)
181
if (
Control
!= null)
182
Control
.UpdateBackground(background);
242
Control
.RemoveGestureRecognizer(_tapGestureRecognizer);
249
Control
.RemoveGestureRecognizer(_panGestureRecognizer);
iOS\Renderers\SwitchRenderer.cs (9)
27
Control
.ValueChanged -= OnControlValueChanged;
40
if (
Control
== null)
43
Control
.ValueChanged += OnControlValueChanged;
48
Control
.On = Element.IsToggled;
63
Control
.OnTintColor = _defaultOnColor;
65
Control
.OnTintColor = Element.OnColor.ToPlatform();
76
Control
.ThumbTintColor = thumbColor?.ToPlatform() ?? _defaultThumbColor;
82
((IElementController)Element).SetValueFromRenderer(Switch.IsToggledProperty,
Control
.On);
87
Control
.SetState(Element.IsToggled, true);
iOS\Renderers\TableViewRenderer.cs (22)
27
return
Control
.GetSizeRequest(widthConstraint, heightConstraint, DefaultRowHeight, DefaultRowHeight);
82
if (
Control
== null ||
Control
.Style != style)
84
if (
Control
!= null)
87
Control
.Dispose();
96
_insetTracker = new KeyboardInsetTracker(tv, () =>
Control
.Window, insets =>
Control
.ContentInset =
Control
.ScrollIndicatorInsets = insets, point =>
98
var offset =
Control
.ContentOffset;
100
Control
.SetContentOffset(offset, true);
129
if (!
Control
.Layer.ShouldRasterize)
131
Control
.Layer.RasterizationScale = UIScreen.MainScreen.Scale;
132
Control
.Layer.ShouldRasterize = true;
136
Control
.Layer.ShouldRasterize = false;
147
Control
.ReloadData();
153
Control
.Source = modeledView.HasUnevenRows ? new UnEvenTableViewModelRenderer(modeledView) : new TableViewModelRenderer(modeledView);
158
Control
.BackgroundView = Element.BackgroundColor == null ? _originalBackgroundView : null;
159
Control
.BackgroundView.UpdateBackground(Element.Background);
167
Control
.RowHeight = UITableView.AutomaticDimension;
170
Control
.RowHeight = rowHeight <= 0 ? DefaultRowHeight : rowHeight;
178
Control
.EstimatedRowHeight = DefaultRowHeight;
182
Control
.EstimatedRowHeight = 0;
iOS\Renderers\TimePickerRenderer.cs (14)
69
if (
Control
!= null)
71
Control
.EditingDidBegin -= OnStarted;
72
Control
.EditingDidEnd -= OnEnded;
87
if (
Control
== null)
185
(
Control
as UITextField).UpdateTextAlignment(Element);
191
Control
.Font = Element.ToUIFont();
200
Control
.TextColor = _defaultTextColor;
202
Control
.TextColor = textColor.ToPlatform();
205
Control
.Text =
Control
.Text;
211
var textAttr =
Control
.AttributedText.WithCharacterSpacing(Element.CharacterSpacing);
214
Control
.AttributedText = textAttr;
231
Control
.Text = DateTime.Today.Add(Element.Time).ToString(timeformat, cultureInfos);
236
Control
.Text = DateTime.Today.Add(Element.Time).ToString(Element.Format, cultureInfos);
iOS\Shapes\EllipseRenderer.cs (1)
22
if (
Control
== null && args.NewElement != null)
iOS\Shapes\LineRenderer.cs (5)
25
if (
Control
== null && args.NewElement != null)
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)
23
if (
Control
== null && args.NewElement != null)
46
Control
.UpdatePath(Element.Data.ToCGPath(Element.RenderTransform));
iOS\Shapes\PolygonRenderer.cs (3)
26
if (
Control
== null && args.NewElement != null)
76
Control
.UpdatePoints(_points.ToCGPoints());
81
Control
.UpdateFillMode(Element.FillRule == FillRule.Nonzero);
iOS\Shapes\PolylineRenderer.cs (3)
26
if (
Control
== null && args.NewElement != null)
73
Control
.UpdatePoints(_points.ToCGPoints());
78
Control
.UpdateFillMode(Element.FillRule == FillRule.Nonzero);
iOS\Shapes\RectangleRenderer.cs (3)
28
if (
Control
== null && args.NewElement != null)
59
Control
.UpdateRadiusX(radiusX);
68
Control
.UpdateRadiusY(radiusY);
iOS\Shapes\ShapeRenderer.cs (13)
91
if (
Control
!= null)
93
return
Control
.ShapeLayer.GetDesiredSize();
101
Control
.ShapeLayer.UpdateAspect(Element.Aspect);
106
Control
.ShapeLayer.UpdateSize(new CGSize(new nfloat(_width), new nfloat(_height)));
111
Control
.ShapeLayer.UpdateFill(Element.Fill);
116
Control
.ShapeLayer.UpdateStroke(Element.Stroke);
121
Control
.ShapeLayer.UpdateStrokeThickness(Element.StrokeThickness);
127
Control
.ShapeLayer.UpdateStrokeDash(Array.Empty<nfloat>());
152
Control
.ShapeLayer.UpdateStrokeDash(dashArray);
158
Control
.ShapeLayer.UpdateStrokeDashOffset((nfloat)Element.StrokeDashOffset);
179
Control
.ShapeLayer.UpdateStrokeLineCap(iLineCap);
200
Control
.ShapeLayer.UpdateStrokeLineJoin(iLineJoin);
205
Control
.ShapeLayer.UpdateStrokeMiterLimit(new nfloat(Element.StrokeMiterLimit));
iOS\ViewRenderer.cs (30)
49
private protected bool IsElementOrControlEmpty => Element == null ||
Control
== null;
57
NativeView IVisualNativeElementRenderer.Control =>
Control
;
78
NativeView ITabStop.TabStop =>
Control
;
83
if (
Control
!= null && Element != null)
84
Control
.Frame = new RectangleF(0, 0, (nfloat)Element.Width, (nfloat)Element.Height);
89
if (
Control
== null)
92
return
Control
.SizeThatFits(size);
122
if (
Control
!= null && ManageNativeControlLifetime)
124
Control
.RemoveFromSuperview();
125
Control
.Dispose();
142
if (
Control
!= null && e.OldElement != null && e.OldElement.BackgroundColor != e.NewElement.BackgroundColor || e.NewElement.BackgroundColor != null)
145
if (
Control
!= null && e.OldElement != null && e.OldElement.Background != e.NewElement.Background)
157
if (
Control
!= null)
176
effect.Control =
Control
;
181
_defaultAccessibilityHint =
Control
.SetAccessibilityHint(Element, _defaultAccessibilityHint);
186
_defaultAccessibilityLabel =
Control
.SetAccessibilityLabel(Element, _defaultAccessibilityLabel);
191
_defaultIsAccessibilityElement =
Control
.SetIsAccessibilityElement(Element, _defaultIsAccessibilityElement);
195
_defaultAccessibilityElementsHidden =
Control
.SetAccessibilityElementsHidden(Element, _defaultAccessibilityElementsHidden);
200
if (
Control
== null)
205
Control
.AccessibilityIdentifier = id;
215
Control
.BackgroundColor = _defaultColor;
217
Control
.BackgroundColor = color.ToPlatform();
228
Control
.UpdateBackground(brush);
262
Control
?.SetNeedsDisplay();
267
base.SendVisualElementInitialized(element,
Control
);
296
var uiControl =
Control
as NativeControl;
308
Control
.UpdateFlowDirection(Element);
314
if (
Control
== null)
318
focusRequestArgs.Result = focusRequestArgs.Focus ?
Control
.BecomeFirstResponder() :
Control
.ResignFirstResponder();