1 write to Control
Microsoft.Maui.Controls.Compatibility (1)
Android\ViewRenderer.cs (1)
322
Control
= control;
239 references to Control
Microsoft.Maui.Controls.Compatibility (239)
Android\AppCompat\ButtonRenderer.cs (16)
35
global::Android.Widget.Button NativeButton =>
Control
;
71
if (
Control
!= null)
73
Control
.SetOnClickListener(null);
74
Control
.SetOnTouchListener(null);
75
Control
.RemoveOnAttachStateChangeListener(this);
93
if (
Control
== null)
137
if (Element == null ||
Control
== null)
155
Control
.Enabled = Element.IsEnabled;
188
_textColorSwitcher?.UpdateTextColor(
Control
, Element.TextColor);
201
float IBorderVisualElementRenderer.ShadowRadius =>
Control
.ShadowRadius;
202
float IBorderVisualElementRenderer.ShadowDx =>
Control
.ShadowDx;
203
float IBorderVisualElementRenderer.ShadowDy =>
Control
.ShadowDy;
204
AColor IBorderVisualElementRenderer.ShadowColor =>
Control
.ShadowColor;
209
AView IBorderVisualElementRenderer.View =>
Control
;
222
AppCompatButton IButtonLayoutRenderer.View =>
Control
;
223
bool IDisposedState.IsDisposed => _isDisposed || !
Control
.IsAlive();
Android\AppCompat\PickerRenderer.cs (3)
53
if (
Control
== null)
109
Control
.ClearFocus();
210
protected override AppCompatEditText EditText =>
Control
;
Android\AppCompat\SwitchRenderer.cs (12)
66
Control
?.SetOnCheckedChangeListener(null);
84
if (
Control
== null)
95
Control
.Checked = e.NewElement.IsToggled;
119
if (Element == null ||
Control
== null)
122
if (
Control
.Checked)
126
Control
.TrackDrawable = _defaultTrackDrawable;
130
Control
.TrackDrawable?.SetColorFilter(Element.OnColor, FilterMode.SrcAtop);
135
Control
.TrackDrawable?.ClearColorFilter();
147
Control
.ThumbDrawable?.SetColorFilter(Element.ThumbColor, FilterMode.SrcAtop);
154
Control
.ThumbDrawable?.ClearColorFilter();
163
Control
.Checked = Element.IsToggled;
168
Control
.Enabled = Element.IsEnabled;
Android\NativeViewWrapperRenderer.cs (1)
42
Control
.LayoutChange += (sender, args) => ((IVisualElementController)Element)?.InvalidateMeasure(InvalidationTrigger.MeasureChanged);
Android\Renderers\ActivityIndicatorRenderer.cs (6)
28
AProgressBar progressBar =
Control
;
52
if (Element == null ||
Control
== null)
58
Control
.IndeterminateDrawable?.SetColorFilter(color.ToAndroid(), FilterMode.SrcIn);
60
Control
.IndeterminateDrawable?.ClearColorFilter();
66
if (Element == null ||
Control
== null)
69
Control
.Visibility = Element.IsRunning ? ViewStates.Visible : ViewStates.Invisible;
Android\Renderers\DatePickerRenderer.cs (1)
232
protected override EditText EditText =>
Control
;
Android\Renderers\EditorRenderer.cs (2)
35
protected override AppCompatEditText EditText =>
Control
;
115
var edit =
Control
;
Android\Renderers\EntryRenderer.cs (7)
36
protected override EditText EditText =>
Control
;
302
if (Element == null ||
Control
== null)
376
Control
?.ClearFocus();
412
if (
Control
== null || Element == null)
421
if (_nativeSelectionIsUpdating ||
Control
== null || Element == null)
447
if (_nativeSelectionIsUpdating ||
Control
== null || Element == null || EditText == null)
572
if (
Control
.IsFocused)
Android\Renderers\FormsWebViewClient.cs (2)
95
if (failingUrl == _renderer?.
Control
.Url)
112
if (request.Url.ToString() == _renderer?.
Control
.Url)
Android\Renderers\ImageRenderer.cs (6)
91
if (Element == null ||
Control
== null ||
Control
.IsDisposed())
97
Control
.SetScaleType(type);
122
if (Element == null ||
Control
== null ||
Control
.IsDisposed())
127
await
Control
.UpdateBitmap(Element, previous).ConfigureAwait(false);
Android\Renderers\LabelRenderer.cs (10)
72
var hint =
Control
.Hint;
74
Control
.Hint = string.Empty;
79
Control
.Hint = hint;
93
Control
.RecalculateSpanPositions(Element, _spannableString, new SizeRequest(new Size(r - l, b - t)));
177
Control
.UpdateFlowDirection(Element);
249
if (
Control
is TextView textControl)
267
Control
.SetMaxLines(Element);
294
Control
.SetText(Html.FromHtml(Element.Text ?? string.Empty, FromHtmlOptions.ModeCompact), TextView.BufferType.Spannable);
297
Control
.SetText(Html.FromHtml(Element.Text ?? string.Empty), TextView.BufferType.Spannable);
318
Control
.SetPadding(
Android\Renderers\ListViewRenderer.cs (36)
81
if (
Control
!= null)
84
Control
.Adapter = null;
86
Control
.SetOnScrollListener(null);
111
if (
Control
!= null)
112
Control
.NestedScrollingEnabled = (Parent.GetParentOfType<NestedScrollView>() != null);
140
if (
Control
!= null)
143
Control
.Adapter = null;
145
Control
.SetOnScrollListener(null);
157
AListView nativeListView =
Control
;
174
Control
?.SetOnScrollListener(new ListViewScrollDetector(this));
198
if (
Control
== null)
203
var position =
Control
.GetPositionForView(viewCell);
204
var id =
Control
.GetItemIdAtPosition(position);
209
_adapter.OnItemClick(
Control
, viewCell, position, id);
214
if (
Control
== null)
219
var position =
Control
.GetPositionForView(viewCell);
220
var id =
Control
.GetItemIdAtPosition(position);
225
_adapter.OnItemLongClick(
Control
, viewCell, position, id);
315
Control
.SmoothScrollToPosition(realPositionWithHeader);
317
Control
.SetSelection(realPositionWithHeader);
321
int height =
Control
.Height;
325
int first =
Control
.FirstVisiblePosition;
326
if (first <= scrollPosition && scrollPosition <=
Control
.LastVisiblePosition)
327
cellHeight =
Control
.GetChildAt(scrollPosition - first).Height;
331
view.Measure(MeasureSpecFactory.MakeMeasureSpec(
Control
.Width, MeasureSpecMode.AtMost), MeasureSpecFactory.MakeMeasureSpec(0, MeasureSpecMode.Unspecified));
344
Control
.SmoothScrollToPositionFromTop(realPositionWithHeader, y);
346
Control
.SetSelectionFromTop(realPositionWithHeader, y);
442
if (
Control
!= null)
444
Control
.FastScrollEnabled = Element.OnThisPlatform().IsFastScrollEnabled();
450
if (
Control
!= null)
454
Control
.ChoiceMode = ChoiceMode.None;
459
Control
.ChoiceMode = ChoiceMode.Single;
474
_defaultHorizontalScrollVisibility =
Control
.HorizontalScrollBarEnabled ? ScrollBarVisibility.Always : ScrollBarVisibility.Never;
484
Control
.HorizontalScrollBarEnabled = newHorizontalScrollVisiblility == ScrollBarVisibility.Always;
490
_defaultVerticalScrollVisibility =
Control
.VerticalScrollBarEnabled ? ScrollBarVisibility.Always : ScrollBarVisibility.Never;
497
Control
.VerticalScrollBarEnabled = newVerticalScrollVisibility == ScrollBarVisibility.Always;
Android\Renderers\ProgressBarRenderer.cs (9)
31
if (
Control
== null)
61
if (Element == null ||
Control
== null)
68
(
Control
.Indeterminate ?
Control
.IndeterminateDrawable :
69
Control
.ProgressDrawable).ClearColorFilter();
74
if (
Control
.Indeterminate)
75
Control
.IndeterminateTintList = tintList;
77
Control
.ProgressTintList = tintList;
84
Control
.Progress = (int)(Element.Progress * 10000);
Android\Renderers\SearchBarRenderer.cs (23)
46
ClearFocus(
Control
);
70
Control
.HideSoftInput();
80
Control
?.PostShowSoftInput();
88
SearchView searchView =
Control
;
96
_editText = _editText ??
Control
.GetChildrenOfType<AppCompatAutoCompleteTextView>().FirstOrDefault();
174
ClearFocus(
Control
);
180
_editText = _editText ??
Control
.GetChildrenOfType<AppCompatAutoCompleteTextView>().FirstOrDefault();
191
_editText = _editText ??
Control
.GetChildrenOfType<AppCompatAutoCompleteTextView>().FirstOrDefault();
201
int searchViewCloseButtonId =
Control
.Resources.GetIdentifier("android:id/search_close_btn", null, null);
219
SearchView control =
Control
;
243
_editText = _editText ??
Control
.GetChildrenOfType<AppCompatAutoCompleteTextView>().FirstOrDefault();
255
Control
.QueryHint = Element.Placeholder;
267
string query =
Control
.Query;
270
Control
.SetQuery(text, false);
276
_editText = _editText ??
Control
.GetChildrenOfType<AppCompatAutoCompleteTextView>().FirstOrDefault();
291
_editText = _editText ??
Control
.GetChildrenOfType<AppCompatAutoCompleteTextView>().FirstOrDefault();
308
var currentControlText =
Control
.Query;
311
Control
.SetQuery(currentControlText.Substring(0, Element.MaxLength), false);
332
Control
.InputType = (int)_inputType;
336
_editText = _editText ??
Control
.GetChildrenOfType<AppCompatAutoCompleteTextView>().FirstOrDefault();
359
if (
Control
.IsAlive())
361
Control
.SetOnQueryTextListener(null);
362
Control
.SetOnQueryTextFocusChangeListener(null);
Android\Renderers\SliderRenderer.cs (13)
26
get { return _min + (_max - _min) * (
Control
.Progress / 1000.0); }
27
set {
Control
.Progress = (int)((value - _min) / (_max - _min) * 1000.0); }
77
get { return
Control
; }
137
Control
.ProgressTintList = ColorStateList.ValueOf(Element.MinimumTrackColor.ToAndroid());
138
Control
.ProgressTintMode = PorterDuff.Mode.SrcIn;
150
Control
.ProgressBackgroundTintList = ColorStateList.ValueOf(Element.MaximumTrackColor.ToAndroid());
151
Control
.ProgressBackgroundTintMode = PorterDuff.Mode.SrcIn;
159
Control
.Thumb.SetColorFilter(Element.ThumbColor, FilterMode.SrcIn);
167
Control
.SetThumb(drawable);
177
if (
Control
== null)
180
SeekBar seekbar =
Control
;
197
if (
Control
.IsAlive())
199
Control
.SetOnSeekBarChangeListener(null);
Android\Renderers\SwipeViewRenderer.cs (5)
76
if (
Control
== null)
121
Control
?.SetWindowBackground();
138
if (
Control
!= null &&
Control
.Parent != null && _viewPagerParent == null)
139
_viewPagerParent =
Control
.Parent.GetParentOfType<FormsViewPager>();
Android\Renderers\TableViewRenderer.cs (5)
41
AListView listView =
Control
;
60
if (
Control
!= null)
61
Control
.NestedScrollingEnabled = (Parent.GetParentOfType<NestedScrollView>() != null);
76
if (
Control
!= null)
78
Control
.Adapter = null;
Android\Renderers\TimePickerRenderer.cs (2)
61
Control
.TextAlignment = global::Android.Views.TextAlignment.ViewStart;
209
protected override EditText EditText =>
Control
;
Android\Renderers\WebViewRenderer.cs (19)
38
Control
.LoadDataWithBaseURL(baseUrl ?? AssetBaseUrl, html, "text/html", "UTF-8", null);
56
Control
.LoadUrl(url);
86
Control
?.StopLoading();
136
if (
Control
== null)
355
Control
.EvaluateJavascript(script, jsr);
362
if (
Control
.CanGoBack())
365
Control
.GoBack();
373
if (
Control
.CanGoForward())
376
Control
.GoForward();
384
SyncNativeCookies(
Control
.Url?.ToString());
386
Control
.Reload();
392
if (Element == null ||
Control
== null)
394
ElementController.CanGoBack =
Control
.CanGoBack();
395
ElementController.CanGoForward =
Control
.CanGoForward();
401
if (
Control
!= null)
403
Control
.Settings.MixedContentMode = (MixedContentHandling)Element.OnThisPlatform().MixedContentMode();
411
Control
.Settings.SetSupportZoom(value);
412
Control
.Settings.BuiltInZoomControls = value;
418
Control
.Settings.DisplayZoomControls = Element.OnThisPlatform().ZoomControlsDisplayed();
Android\Shapes\EllipseRenderer.cs (1)
18
if (
Control
== null && args.NewElement != null)
Android\Shapes\LineRenderer.cs (5)
19
if (
Control
== null && args.NewElement != null)
51
Control
.UpdateX1((float)Element.X1);
56
Control
.UpdateY1((float)Element.Y1);
61
Control
.UpdateX2((float)Element.X2);
66
Control
.UpdateY2((float)Element.Y2);
Android\Shapes\PathRenderer.cs (3)
20
if (
Control
== null && args.NewElement != null)
49
Control
.UpdateData(Element.Data.ToAPath(Context));
57
Control
.UpdateTransform(Element.RenderTransform.ToAndroid(density));
Android\Shapes\PolygonRenderer.cs (3)
23
if (
Control
== null && args.NewElement != null)
70
Control
.UpdatePoints(_points);
75
Control
.UpdateFillMode(Element.FillRule == FillRule.Nonzero);
Android\Shapes\PolylineRenderer.cs (3)
23
if (
Control
== null && args.NewElement != null)
70
Control
.UpdatePoints(_points);
75
Control
.UpdateFillMode(Element.FillRule == FillRule.Nonzero);
Android\Shapes\RectangleRenderer.cs (3)
20
if (
Control
== null && args.NewElement != null)
49
Control
.UpdateRadiusX(Element.RadiusX / Element.Width);
55
Control
.UpdateRadiusY(Element.RadiusY / Element.Height);
Android\Shapes\ShapeRenderer.cs (11)
98
return
Control
.GetDesiredSize();
106
Control
.UpdateSize(_width, _height);
111
Control
.UpdateAspect(Element.Aspect);
116
Control
.UpdateFill(Element.Fill);
121
Control
.UpdateStroke(Element.Stroke);
126
Control
.UpdateStrokeThickness((float)Element.StrokeThickness);
131
Control
.UpdateStrokeDashArray(Element.StrokeDashArray.ToArray());
136
Control
.UpdateStrokeDashOffset((float)Element.StrokeDashOffset);
157
Control
.UpdateStrokeLineCap(aLineCap);
178
Control
.UpdateStrokeLineJoin(aLineJoin);
183
Control
.UpdateStrokeMiterLimit((float)Element.StrokeMiterLimit);
Android\ViewRenderer.cs (32)
48
protected virtual AView ControlUsedForAutomation =>
Control
;
50
AView ITabStop.TabStop =>
Control
;
54
MeasureExactly(
Control
, Element, Context);
119
if (
Control
== null)
122
AView view = _container == this ? (AView)
Control
: _container;
125
return new SizeRequest(new Size(
Control
.MeasuredWidth,
Control
.MeasuredHeight), MinimumSize());
132
if (
Control
!= null && ManageNativeControlLifetime)
134
Control
.OnFocusChangeListener = null;
190
if (
Control
== null)
193
AView view = _container == this ? (AView)
Control
: _container;
202
effect.Control =
Control
;
216
if (
Control
== null)
247
if (
Control
== null)
258
if (
Control
== null)
275
if (
Control
== null)
288
if (
Control
== null ||
Control
.IsDisposed())
291
if (
Control
is IPopupTrigger popupElement)
294
Control
?.RequestFocus();
299
Control
.ClearFocus();
309
base.SendVisualElementInitialized(element,
Control
);
314
if (
Control
!= null)
316
Control
.OnFocusChangeListener = null;
317
RemoveView(
Control
);
323
if (
Control
.Id == NoId)
325
Control
.Id = Platform.GenerateViewId();
331
Control
.OnFocusChangeListener = this;
339
=> Controls.Platform.AutomationPropertiesProvider.SetLabeledBy(
Control
, Element);
343
if (
Control
!= null)
344
Control
.Enabled = Element.IsEnabled;
349
Control
.UpdateFlowDirection(Element);