2 writes to Element
Microsoft.Maui.Controls.Compatibility (2)
Android\VisualElementRenderer.cs (2)
138 Element = element ?? throw new ArgumentNullException(nameof(element)); 247 Element = null;
480 references to Element
Microsoft.Maui.Controls.Compatibility (480)
Android\AppCompat\ButtonRenderer.cs (13)
137 if (Element == null || Control == null) 155 Control.Enabled = Element.IsEnabled; 161 Button button = Element; 180 NativeButton.Typeface = font.ToTypeface(Element.RequireFontManager()); 188 _textColorSwitcher?.UpdateTextColor(Control, Element.TextColor); 194 NativeButton.LetterSpacing = Element.CharacterSpacing.ToEm(); 197 void IOnClickListener.OnClick(AView v) => ButtonElementManager.OnClick(Element, Element, v); 199 bool IOnTouchListener.OnTouch(AView v, MotionEvent e) => ButtonElementManager.OnTouch(Element, Element, v, e); 205 bool IBorderVisualElementRenderer.UseDefaultPadding() => Element.OnThisPlatform().UseDefaultPadding(); 206 bool IBorderVisualElementRenderer.UseDefaultShadow() => Element.OnThisPlatform().UseDefaultShadow(); 208 VisualElement IBorderVisualElementRenderer.Element => Element;
Android\AppCompat\CarouselPageRenderer.cs (15)
33 IPageController PageController => Element as IPageController; 47 Element.CurrentPage = Element.Children[position]; 48 if (_previousPage != Element.CurrentPage) 51 _previousPage = Element.CurrentPage; 53 Element.CurrentPage.SendAppearing(); 62 if (Element != null) 80 if (Element?.Children != null) 82 foreach (ContentPage pageToRemove in Element.Children) 105 Element.CurrentPage?.SendAppearing(); 113 Element.CurrentPage?.SendDisappearing(); 163 if (e.PropertyName == nameof(Element.CurrentPage)) 189 ((FormsFragmentPagerAdapter<ContentPage>)pager.Adapter).CountOverride = Element.Children.Count; 195 _viewPager.SetCurrentItem(Element.Children.IndexOf(Element.CurrentPage), true);
Android\AppCompat\NavigationPageRenderer.cs (23)
78 INavigationPageController NavigationPageController => Element as INavigationPageController; 122 IPageController PageController => Element; 278 if (Element != null) 304 if (!Element.IsAttachedToRoot()) 350 _toolbarTracker.AdditionalTargets = Element.GetParentPages(); 361 if (_isAttachedToWindow && Element.IsAttachedToRoot()) 394 if (Element.IsSet(BarHeightProperty)) 395 barHeight = Element.OnThisPlatform().GetBarHeight(); 413 Element.ForceLayout(); 540 Element?.PopAsync(); 626 Element page = Element.RealParent; 669 ToolbarNavigationClickListener = new ClickListener(Element) 783 if (!Element.IsAttachedToRoot()) 906 _toolbar.UpdateMenuItems(_toolbarTracker?.ToolbarItems, Element.FindMauiContext(), null, OnToolbarItemPropertyChanged, _currentMenuItems, _currentToolbarItems, UpdateMenuItemIcon); 912 _toolbar.OnToolbarItemPropertyChanged(e, (ToolbarItem)sender, items, Element.FindMauiContext(), null, OnToolbarItemPropertyChanged, _currentMenuItems, _currentToolbarItems, UpdateMenuItemIcon); 917 Element.FindMauiContext().UpdateMenuItemIcon(menuItem, toolBarItem, null); 934 Page currentPage = Element.CurrentPage; 950 var prevPage = Element.Peek(1); 971 Color tintColor = Element.BarBackgroundColor; 981 Brush barBackground = Element.BarBackground; 984 Color textColor = Element.BarTextColor; 1008 Page currentPage = Element.CurrentPage; 1049 Page currentPage = Element.CurrentPage;
Android\AppCompat\PickerRenderer.cs (23)
36 ((INotifyCollectionChanged)Element.Items).CollectionChanged -= RowsCollectionChanged; 59 ControlUsedForAutomation.SetAccessibilityDelegate(_pickerAccessibilityDelegate = new EntryAccessibilityDelegate(Element)); 108 ((IElementController)Element).SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false); 117 Picker model = Element; 122 if (!Element.IsSet(Picker.TitleColorProperty)) 141 ((IElementController)Element).SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, true); 148 (Element as IElementController)?.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false); 165 EditText.Typeface = Element.ToTypeface(); 166 EditText.SetTextSize(ComplexUnitType.Sp, (float)Element.FontSize); 172 EditText.LetterSpacing = Element.CharacterSpacing.ToEm(); 181 if (Element.SelectedIndex == -1 || Element.Items == null || Element.SelectedIndex >= Element.Items.Count) 184 EditText.Text = Element.Items[Element.SelectedIndex]; 215 _hintColorSwitcher = _hintColorSwitcher ?? new TextColorSwitcher(EditText.HintTextColors, Element.UseLegacyColorManagement()); 216 _hintColorSwitcher.UpdateTextColor(EditText, Element.TitleColor, EditText.SetHintTextColor); 222 _textColorSwitcher = _textColorSwitcher ?? new TextColorSwitcher(EditText.TextColors, Element.UseLegacyColorManagement()); 223 _textColorSwitcher.UpdateTextColor(EditText, Element.TextColor); 227 EditText.Hint = Element.Title; 233 EditText.Gravity = Element.HorizontalTextAlignment.ToHorizontalGravityFlags() | Element.VerticalTextAlignment.ToVerticalGravityFlags();
Android\AppCompat\SwitchRenderer.cs (11)
30 ((IViewController)Element).SetValueFromRenderer(Switch.IsToggledProperty, isChecked); 63 if (Element != null) 64 Element.Toggled -= HandleToggled; 119 if (Element == null || Control == null) 124 if (Element.OnColor == null) 130 Control.TrackDrawable?.SetColorFilter(Element.OnColor, FilterMode.SrcAtop); 142 if (Element == null) 145 if (Element.ThumbColor != null) 147 Control.ThumbDrawable?.SetColorFilter(Element.ThumbColor, FilterMode.SrcAtop); 163 Control.Checked = Element.IsToggled; 168 Control.Enabled = Element.IsEnabled;
Android\AppCompat\TabbedPageRenderer.cs (62)
78 bool IsBottomTabPlacement => (Element != null) ? Element.OnThisPlatform().GetToolbarPlacement() == ToolbarPlacement.Bottom : false; 84 if (Element != null) 86 if (Element.IsSet(TabbedPage.UnselectedTabColorProperty)) 87 return Element.UnselectedTabColor; 98 if (Element != null) 100 if (Element.IsSet(TabbedPage.SelectedTabColorProperty)) 101 return Element.SelectedTabColor; 108 IPageController PageController => Element as IPageController; 128 if (_previousPage != Element.CurrentPage) 131 _previousPage = Element.CurrentPage; 133 Element.CurrentPage = Element.Children[position]; 134 Element.CurrentPage.SendAppearing(); 146 if (Element == null) 150 if (Element.Children.Count > selectedIndex && selectedIndex >= 0) 151 Element.CurrentPage = Element.Children[selectedIndex]; 167 if (Element != null) 171 foreach (Page pageToRemove in Element.Children) 207 if (Element != null) 209 foreach (Page pageToRemove in Element.Children) 339 if (Element.CurrentPage != null) 450 ((FormsFragmentPagerAdapter<Page>)pager.Adapter).CountOverride = Element.Children.Count; 454 if (Element.Children.Count == 0) 471 ((FormsFragmentPagerAdapter<Page>)pager.Adapter).CountOverride = Element.Children.Count; 473 if (Element.Children.Count == 0) 514 foreach (var page in Element.Children) 523 var index = Element.Children.IndexOf(page); 539 var index = Element.Children.IndexOf(page); 563 _viewPager.SetCurrentItem(Element.Children.IndexOf(Element.CurrentPage), Element.OnThisPlatform().IsSmoothScrollEnabled()); 573 foreach (IPageController child in Element.Children) 579 _viewPager.OffscreenPageLimit = Element.OnThisPlatform().OffscreenPageLimit(); 584 _viewPager.EnableGesture = Element.OnThisPlatform().IsSwipePagingEnabled(); 634 for (int i = 0; i < Element.Children.Count; i++) 636 var item = Element.Children[i]; 648 var currentIndex = Element.Children.IndexOf(Element.CurrentPage); 657 Element.FindMauiContext()); 659 if (Element.CurrentPage == null && Element.Children.Count > 0) 660 Element.CurrentPage = Element.Children[0]; 670 if (tabs.TabCount != Element.Children.Count) 673 for (var i = 0; i < Element.Children.Count; i++) 675 Page child = Element.Children[i]; 715 Color tintColor = Element.BarBackgroundColor; 724 Color tintColor = Element.BarBackgroundColor; 743 var barBackground = Element.BarBackground; 760 Color barTextColor = Element.BarTextColor; 833 if (Element == null || IsDisposed) 840 var bottomSheetDialog = BottomNavigationViewUtils.CreateMoreBottomSheet(OnMoreItemSelected, Element.FindMauiContext(), items, _bottomNavigationView.MaxItemCount); 846 if (_bottomNavigationView.SelectedItemId != item.ItemId && Element.Children.Count > item.ItemId) 847 Element.CurrentPage = Element.Children[item.ItemId]; 854 var index = Element.Children.IndexOf(Element.CurrentPage); 870 if (selectedIndex >= 0 && _bottomNavigationView.SelectedItemId != selectedIndex && Element.Children.Count > selectedIndex) 871 Element.CurrentPage = Element.Children[selectedIndex];
Android\NativeViewWrapperRenderer.cs (8)
18 if (Element?.GetDesiredSizeDelegate == null) 22 SizeRequest? result = Element.GetDesiredSizeDelegate(this, widthConstraint, heightConstraint); 41 SetNativeControl(Element.NativeView); 42 Control.LayoutChange += (sender, args) => ((IVisualElementController)Element)?.InvalidateMeasure(InvalidationTrigger.MeasureChanged); 48 if (Element?.OnLayoutDelegate == null) 55 bool handled = Element.OnLayoutDelegate(this, changed, l, t, r, b); 64 if (Element?.OnMeasureDelegate == null) 71 bool handled = Element.OnMeasureDelegate(this, widthMeasureSpec, heightMeasureSpec);
Android\Renderers\ActivityIndicatorRenderer.cs (4)
52 if (Element == null || Control == null) 55 Color color = Element.Color; 66 if (Element == null || Control == null) 69 Control.Visibility = Element.IsRunning ? ViewStates.Visible : ViewStates.Invisible;
Android\Renderers\BoxRenderer.cs (11)
73 Brush brushToSet = Element.Background; 88 Color colorToSet = Element.Color; 91 colorToSet = Element.BackgroundColor; 105 colorToSet = Element.BackgroundColor; 127 if (Element != null) 129 Element.PropertyChanged -= OnElementPropertyChanged; 131 if (Platform.GetRenderer(Element) == this) 132 Element.ClearValue(Platform.RendererProperty); 142 var cornerRadius = Element.CornerRadius; 186 var elementWidthRequest = Element.WidthRequest; 187 var elementHeightRequest = Element.HeightRequest;
Android\Renderers\DatePickerRenderer.cs (17)
57 SetDate(Element.Date); 71 SetDate(Element.Date); 98 ((IElementController)Element).SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false); 106 DatePicker view = Element; 136 DatePicker view = Element; 164 Element.Unfocus(); 169 if (String.IsNullOrWhiteSpace(Element.Format)) 173 else if (Element.Format.Contains('/', StringComparison.Ordinal)) 175 EditText.Text = date.ToString(Element.Format, CultureInfo.InvariantCulture); 179 EditText.Text = date.ToString(Element.Format); 186 EditText.LetterSpacing = Element.CharacterSpacing.ToEm(); 192 EditText.Typeface = Element.ToTypeface(); 193 EditText.SetTextSize(ComplexUnitType.Sp, (float)Element.FontSize); 201 _dialog.DatePicker.MaxDate = (long)Element.MaximumDate.ToUniversalTime().Subtract(DateTime.MinValue.AddYears(1969)).TotalMilliseconds; 210 _dialog.DatePicker.MinDate = (long)Element.MinimumDate.ToUniversalTime().Subtract(DateTime.MinValue.AddYears(1969)).TotalMilliseconds; 236 _textColorSwitcher = _textColorSwitcher ?? new TextColorSwitcher(EditText.TextColors, Element.UseLegacyColorManagement()); 237 _textColorSwitcher.UpdateTextColor(EditText, Element.TextColor);
Android\Renderers\EditorRenderer.cs (20)
40 _hintColorSwitcher = _hintColorSwitcher ?? new TextColorSwitcher(EditText.HintTextColors, Element.UseLegacyColorManagement()); 41 _hintColorSwitcher.UpdateTextColor(EditText, Element.PlaceholderColor, EditText.SetHintTextColor); 47 _textColorSwitcher = _textColorSwitcher ?? new TextColorSwitcher(EditText.TextColors, Element.UseLegacyColorManagement()); 48 _textColorSwitcher.UpdateTextColor(EditText, Element.TextColor); 77 IEditorController ElementController => Element; 89 Internals.TextTransformUtilites.SetPlainText(Element, s?.ToString()); 214 if (Element.IsFocused && !hasFocus) // Editor has requested an unfocus, fire completed event 221 EditText.Typeface = Element.ToTypeface(); 222 EditText.SetTextSize(ComplexUnitType.Sp, (float)Element.FontSize); 228 Editor model = Element; 256 EditText.LetterSpacing = Element.CharacterSpacing.ToEm(); 262 string newText = Element.UpdateFormsText(Element.Text, Element.TextTransform); 277 if (EditText.Hint == Element.Placeholder) 280 EditText.Hint = Element.Placeholder; 307 currentFilters.Add(new InputFilterLengthFilter(Element.MaxLength)); 318 if (currentText == null || currentText.Length <= Element.MaxLength) 321 return currentText.Substring(0, Element.MaxLength); 327 bool isReadOnly = !Element.IsReadOnly;
Android\Renderers\EntryRenderer.cs (50)
41 bool isReadOnly = !Element.IsReadOnly; 48 _hintColorSwitcher = _hintColorSwitcher ?? new TextColorSwitcher(EditText.HintTextColors, Element.UseLegacyColorManagement()); 49 _hintColorSwitcher.UpdateTextColor(EditText, Element.PlaceholderColor, EditText.SetHintTextColor); 54 UpdateTextColor(Element.TextColor); 60 _textColorSwitcher = _textColorSwitcher ?? new TextColorSwitcher(EditText.TextColors, Element.UseLegacyColorManagement()); 71 IElementController ElementController => Element as IElementController; 110 ((IEntryController)Element).SendCompleted(); 128 Internals.TextTransformUtilites.SetPlainText(Element, s?.ToString()); 169 _cursorPositionChangePending = Element.IsSet(Entry.CursorPositionProperty); 170 _selectionLengthChangePending = Element.IsSet(Entry.SelectionLengthProperty); 226 if (EditText.Hint == Element.Placeholder) 229 EditText.Hint = Element.Placeholder; 302 if (Element == null || Control == null) 304 var imeOptions = Element.OnThisPlatform().ImeOptions(); 312 EditText.UpdateTextAlignment(Element.HorizontalTextAlignment, Element.VerticalTextAlignment); 318 EditText.UpdateTextAlignment(Element.HorizontalTextAlignment, Element.VerticalTextAlignment); 327 EditText.Typeface = Element.ToTypeface(); 328 EditText.SetTextSize(ComplexUnitType.Sp, (float)Element.FontSize); 335 Entry model = Element; 393 currentFilters.Add(new InputFilterLengthFilter(Element.MaxLength)); 399 if (currentControlText.Length > Element.MaxLength) 400 EditText.Text = currentControlText.Substring(0, Element.MaxLength); 406 EditText.LetterSpacing = Element.CharacterSpacing.ToEm(); 412 if (Control == null || Element == null) 415 EditText.ImeOptions = Element.ReturnType.ToAndroidImeAction(); 421 if (_nativeSelectionIsUpdating || Control == null || Element == null) 424 int cursorPosition = Element.CursorPosition; 437 int elementSelectionLength = System.Math.Min(EditText.Text.Length - cursorPosition, Element.SelectionLength); 447 if (_nativeSelectionIsUpdating || Control == null || Element == null || EditText == null) 450 if (!Element.IsReadOnly && EditText.RequestFocus()) 473 int selectionLength = Element.SelectionLength; 475 if (Element.IsSet(Entry.SelectionLengthProperty)) 488 int cursorPosition = Element.CursorPosition; 490 if (Element.IsSet(Entry.CursorPositionProperty)) 536 bool isReadOnly = !Element.IsReadOnly; 545 var text = Element.UpdateFormsText(Element.Text, Element.TextTransform); 591 && (Element as IVisualElementController).EffectiveFlowDirection.IsLeftToRight()) 596 && (Element as IVisualElementController).EffectiveFlowDirection.IsRightToLeft()))) 606 bool showClearBtn = Element.ClearButtonVisibility == ClearButtonVisibility.WhileEditing; 607 if (showClearBtn && Element.IsFocused) 616 bool isFocused = Element.IsFocused; 619 bool showClearBtn = Element.ClearButtonVisibility == ClearButtonVisibility.WhileEditing; 629 if (Element.ClearButtonVisibility == ClearButtonVisibility.WhileEditing) 638 if (Element.ClearButtonVisibility == ClearButtonVisibility.WhileEditing) 644 Drawable d = showClearButton && (Element.Text?.Length > 0) ? GetCloseButtonDrawable() : null; 645 if ((Element as IVisualElementController).EffectiveFlowDirection.IsRightToLeft())
Android\Renderers\FormsWebViewClient.cs (2)
42 if (_renderer?.Element == null || string.IsNullOrWhiteSpace(url) || url == WebViewRenderer.AssetBaseUrl) 66 if (_renderer?.Element == null || url == WebViewRenderer.AssetBaseUrl)
Android\Renderers\ImageRenderer.cs (5)
91 if (Element == null || Control == null || Control.IsDisposed()) 96 AImageView.ScaleType type = Element.Aspect.ToScaleType(); 116 ((IImageController)Element)?.SetIsLoading(false); 122 if (Element == null || Control == null || Control.IsDisposed()) 127 await Control.UpdateBitmap(Element, previous).ConfigureAwait(false);
Android\Renderers\LabelRenderer.cs (33)
93 Control.RecalculateSpanPositions(Element, _spannableString, new SizeRequest(new Size(r - l, b - t))); 177 Control.UpdateFlowDirection(Element); 183 Color c = Element.TextColor; 197 Font f = Font.OfSize(Element.FontFamily, Element.FontSize).WithAttributes(Element.FontAttributes); 199 Typeface newTypeface = f.ToTypeface(Element.RequireFontManager()); 216 if (!Element.IsSet(Label.TextDecorationsProperty)) 219 var textDecorations = Element.TextDecorations; 235 Label label = Element; 244 _view.SetLineBreakMode(Element); 251 textControl.LetterSpacing = Element.CharacterSpacing.ToEm(); 259 if (Element.LineHeight == -1) 261 else if (Element.LineHeight >= 0) 262 _view.SetLineSpacing(0, (float)Element.LineHeight); 267 Control.SetMaxLines(Element); 272 if (Element.FormattedText != null) 274 FormattedString formattedText = Element.FormattedText ?? Element.Text; 276 Font f = Font.OfSize(Element.FontFamily, Element.FontSize).WithAttributes(Element.FontAttributes); 277 _view.TextFormatted = _spannableString = formattedText.ToSpannableString(Element.RequireFontManager()); 289 switch (Element.TextType) 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); 302 _view.Text = Element.UpdateFormsText(Element.Text, Element.TextTransform); 319 (int)Context.ToPixels(Element.Padding.Left), 320 (int)Context.ToPixels(Element.Padding.Top), 321 (int)Context.ToPixels(Element.Padding.Right), 322 (int)Context.ToPixels(Element.Padding.Bottom));
Android\Renderers\ListViewRenderer.cs (16)
31 IListViewController Controller => Element; 32 ITemplatedItemsView<Cell> TemplatedItemsView => Element; 44 IListViewController controller = Element; 280 if (Element.IsGroupingEnabled) 417 var isRefreshing = Element.IsRefreshing; 437 _refresh.Enabled = Element.IsPullToRefreshEnabled && (Element as IListViewController).RefreshAllowed; 444 Control.FastScrollEnabled = Element.OnThisPlatform().IsFastScrollEnabled(); 452 if (Element.SelectionMode == ListViewSelectionMode.None) 455 Element.SelectedItem = null; 457 else if (Element.SelectionMode == ListViewSelectionMode.Single) 466 if (_refresh != null && Element.RefreshControlColor != null) 467 _refresh.SetColorSchemeColors(Element.RefreshControlColor.ToAndroid()); 477 var newHorizontalScrollVisiblility = Element.HorizontalScrollBarVisibility; 492 var newVerticalScrollVisibility = Element.VerticalScrollBarVisibility; 675 _element = renderer.Element;
Android\Renderers\PageRenderer.cs (7)
30 IPageController PageController => Element as IPageController; 101 var newHeight = Element.Height; 105 var nav = Element.Navigation; 108 if (nav?.NavigationStack != null && nav.NavigationStack.Count > 0 && Element == nav.NavigationStack[nav.NavigationStack.Count - 1]) 121 Page page = Element; 131 Brush background = Element.Background; 170 (Element as IView)?.Arrange(destination);
Android\Renderers\ProgressBarRenderer.cs (3)
61 if (Element == null || Control == null) 64 Color color = Element.ProgressColor; 84 Control.Progress = (int)(Element.Progress * 10000);
Android\Renderers\SearchBarRenderer.cs (21)
37 Internals.TextTransformUtilites.SetPlainText(Element, newText); 45 ((ISearchBarController)Element).OnSearchButtonPressed(); 173 if (hasFocus && !Element.IsEnabled) 185 _editText.UpdateHorizontalAlignment(Element.HorizontalTextAlignment, Microsoft.Maui.TextAlignment.Center.ToVerticalGravityFlags()); 196 _editText.UpdateVerticalAlignment(Element.VerticalTextAlignment, Microsoft.Maui.TextAlignment.Center.ToVerticalGravityFlags()); 207 if (Element.CancelButtonColor != null) 208 image.Drawable.SetColorFilter(Element.CancelButtonColor, FilterMode.SrcIn); 218 SearchBar model = Element; 248 _editText.Typeface = Element.ToTypeface(); 249 _editText.SetTextSize(ComplexUnitType.Sp, (float)Element.FontSize); 255 Control.QueryHint = Element.Placeholder; 261 _hintColorSwitcher?.UpdateTextColor(_editText, Element.PlaceholderColor, _editText.SetHintTextColor); 268 var text = Element.UpdateFormsText(Element.Text, Element.TextTransform); 280 _editText.LetterSpacing = Element.CharacterSpacing.ToEm(); 286 _textColorSwitcher?.UpdateTextColor(_editText, Element.TextColor); 304 currentFilters.Add(new InputFilterLengthFilter(Element.MaxLength)); 310 if (currentControlText.Length > Element.MaxLength) 311 Control.SetQuery(currentControlText.Substring(0, Element.MaxLength), false); 316 SearchBar model = Element;
Android\Renderers\SliderRenderer.cs (12)
34 ((IElementController)Element).SetValueFromRenderer(Slider.ValueProperty, Value); 40 ((ISliderController)Element)?.SendDragStarted(); 46 ((ISliderController)Element)?.SendDragCompleted(); 90 Slider view = Element; 119 var thumbImage = Element.ThumbImageSource; 133 if (Element != null) 135 if (Element.MinimumTrackColor != null) 137 Control.ProgressTintList = ColorStateList.ValueOf(Element.MinimumTrackColor.ToAndroid()); 146 if (Element != null) 148 if (Element.MaximumTrackColor != null) 150 Control.ProgressBackgroundTintList = ColorStateList.ValueOf(Element.MaximumTrackColor.ToAndroid()); 159 Control.Thumb.SetColorFilter(Element.ThumbColor, FilterMode.SrcIn);
Android\Renderers\StepperRenderer.cs (1)
60 Stepper IStepperRenderer.Element => Element;
Android\Renderers\SwipeViewRenderer.cs (33)
118 if (Element.BackgroundColor != null) 119 SetBackgroundColor(Element.BackgroundColor.ToAndroid()); 126 Brush background = Element.Background; 141 if (Element != null && _scrollParent == null) 143 _scrollParent = Element.FindParentOfType<ScrollView>(); 151 _scrollParent = Element.FindParentOfType<ListView>(); 159 _scrollParent = Element.FindParentOfType<Microsoft.Maui.Controls.CollectionView>(); 175 if (Element != null) 177 Element.OpenRequested -= OnOpenRequested; 178 Element.CloseRequested -= OnCloseRequested; 352 if (itemContentView != null && !((ISwipeViewController)Element).IsOpen) 365 if (Element.Content == null) 383 var renderer = Element.Content.GetRenderer() ?? Platform.CreateRendererWithContext(Element.Content, Context); 384 Platform.SetRenderer(Element.Content, renderer); 404 swipeItems = Element.RightItems; 407 swipeItems = Element.LeftItems; 410 swipeItems = Element.BottomItems; 413 swipeItems = Element.TopItems; 872 _isSwipeEnabled = Element.IsEnabled; 877 if (Element.IsSet(Specifics.SwipeTransitionModeProperty)) 878 _swipeTransitionMode = Element.OnThisPlatform().GetSwipeTransitionMode(); 951 actionSize = (int)_context.ToPixels(Element.RightItems.Count * SwipeItemWidth); 956 actionSize = (int)_context.ToPixels(Element.LeftItems.Count * SwipeItemWidth); 1079 actionSize = (int)_context.ToPixels(Element.RightItems.Count * SwipeItemWidth); 1084 actionSize = (int)_context.ToPixels(Element.LeftItems.Count * SwipeItemWidth); 1201 double threshold = Element.Threshold; 1344 double threshold = Element.Threshold; 1548 if (Element == null) 1551 ((ISwipeViewController)Element).IsOpen = isOpen; 1585 ((ISwipeViewController)Element).SendSwipeStarted(swipeStartedEventArgs); 1594 ((ISwipeViewController)Element).SendSwipeChanging(swipeChangingEventArgs); 1610 ((ISwipeViewController)Element).SendSwipeEnded(swipeEndedEventArgs);
Android\Renderers\TimePickerRenderer.cs (14)
24 get => (DateFormat.Is24HourFormat(Context) && Element.Format == (string)TimePicker.FormatProperty.DefaultValue) || Element.Format?.Contains('H', StringComparison.Ordinal) == true; 34 IElementController ElementController => Element as IElementController; 74 SetTime(Element.Time); 140 TimePicker view = Element; 158 Element.Unfocus(); 164 if (String.IsNullOrEmpty(Element.Format)) 171 var timeFormat = Element.Format; 175 Element.InvalidateMeasureNonVirtual(Internals.InvalidationTrigger.MeasureChanged); 181 EditText.Typeface = Element.ToTypeface(); 182 EditText.SetTextSize(ComplexUnitType.Sp, (float)Element.FontSize); 188 EditText.LetterSpacing = Element.CharacterSpacing.ToEm(); 214 _textColorSwitcher = _textColorSwitcher ?? new TextColorSwitcher(EditText.TextColors, Element.UseLegacyColorManagement()); 215 _textColorSwitcher.UpdateTextColor(EditText, Element.TextColor);
Android\Renderers\WebViewRenderer.cs (11)
26 protected internal IWebViewController ElementController => Element; 62 if (Element == null || string.IsNullOrWhiteSpace(url)) 84 if (Element != null) 249 var myCookieJar = Element.Cookies; 276 var myCookieJar = Element.Cookies; 306 var myCookieJar = Element.Cookies; 341 Element.Source?.Load(this); 392 if (Element == null || Control == null) 403 Control.Settings.MixedContentMode = (MixedContentHandling)Element.OnThisPlatform().MixedContentMode(); 410 var value = Element.OnThisPlatform().ZoomControlsEnabled(); 418 Control.Settings.DisplayZoomControls = Element.OnThisPlatform().ZoomControlsDisplayed();
Android\Shapes\LineRenderer.cs (4)
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)
49 Control.UpdateData(Element.Data.ToAPath(Context)); 54 if (Element.RenderTransform != null) 57 Control.UpdateTransform(Element.RenderTransform.ToAndroid(density));
Android\Shapes\PolygonRenderer.cs (2)
66 _points = Element.Points; 75 Control.UpdateFillMode(Element.FillRule == FillRule.Nonzero);
Android\Shapes\PolylineRenderer.cs (2)
66 _points = Element.Points; 75 Control.UpdateFillMode(Element.FillRule == FillRule.Nonzero);
Android\Shapes\RectangleRenderer.cs (6)
48 if (Element.Width > 0) 49 Control.UpdateRadiusX(Element.RadiusX / Element.Width); 54 if (Element.Height > 0) 55 Control.UpdateRadiusY(Element.RadiusY / Element.Height);
Android\Shapes\ShapeRenderer.cs (14)
53 _height = Element.Height; 54 _width = Element.Width; 66 _height = Element.Height; 71 _width = Element.Width; 96 if (Element != null) 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); 141 PenLineCap lineCap = Element.StrokeLineCap; 162 PenLineJoin lineJoin = Element.StrokeLineJoin; 183 Control.UpdateStrokeMiterLimit((float)Element.StrokeMiterLimit);
Android\ViewRenderer.cs (15)
54 MeasureExactly(Control, Element, Context); 85 if (Element is Entry || Element is SearchBar || Element is Editor) 88 Element parent = Element.RealParent; 114 ((IElementController)Element).SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, hasFocus); 137 if (Element != null && _focusChangeHandler != null) 139 Element.FocusChangeRequested -= _focusChangeHandler; 230 Controls.Platform.AutomationPropertiesProvider.SetAutomationId(ControlUsedForAutomation, Element, id); 239 ControlUsedForAutomation, Element, _defaultContentDescription, _defaultHint); 242 ControlUsedForAutomation, Element, _defaultContentDescription); 264 Controls.Platform.AutomationPropertiesProvider.SetImportantForAccessibility(ControlUsedForAutomation, Element); 339 => Controls.Platform.AutomationPropertiesProvider.SetLabeledBy(Control, Element); 344 Control.Enabled = Element.IsEnabled; 349 Control.UpdateFlowDirection(Element);
Android\VisualElementRenderer.cs (19)
52 if (Element == null || (InputTransparent && _cascadeInputTransparent)) 90 View View => Element as View; 99 VisualElement IVisualElementRenderer.Element => Element; 137 TElement oldElement = Element; 213 EffectUtilities.UnregisterEffectControlProvider(this, Element); 215 if (Element != null) 217 Element.PropertyChanged -= _propertyChangeHandler; 242 if (Element != null) 244 if (Platform.GetRenderer(Element) == this) 245 Platform.SetRenderer(Element, null); 303 if (Element is IElementController controller) 311 canvas.ClipShape(Context, Element); 349 Controls.Platform.AutomationPropertiesProvider.SetAutomationId(this, Element, id); 355 Controls.Platform.AutomationPropertiesProvider.SetContentDescription(this, Element, _defaultContentDescription, _defaultHint); 359 => Controls.Platform.AutomationPropertiesProvider.SetImportantForAccessibility(this, Element); 363 InputTransparent = Element.InputTransparent; 368 var layout = Element as Layout; 391 SetBackgroundColor(Element.BackgroundColor.ToAndroid()); 396 Brush background = Element.Background;