183 references to ToPlatform
Microsoft.Maui (48)
Graphics\PaintExtensions.iOS.cs (1)
182 CGColor nativeColor = color.ToPlatform().ColorWithAlpha(0.0f).CGColor;
Handlers\Button\ButtonHandler.iOS.cs (1)
112 config.BaseForegroundColor = button?.TextColor.ToPlatform();
Handlers\RefreshView\RefreshViewHandler.iOS.cs (1)
84 var color = handler.VirtualView?.RefreshColor?.ToColor()?.ToPlatform();
Handlers\SwipeItemMenuItem\SwipeItemMenuItemHandler.iOS.cs (2)
61 handler.PlatformView.SetTitleColor(color.ToPlatform(), UIControlState.Normal); 125 button.TintColor = tintColor.ToPlatform();
ImageSources\iOS\ImageSourceExtensions.cs (1)
22 var color = (imageSource.Color ?? Colors.White).ToPlatform();
Platform\iOS\ActivityIndicatorExtensions.cs (1)
16 => activityIndicatorView.Color = activityIndicator.Color?.ToPlatform();
Platform\iOS\AttributedStringExtensions.cs (1)
40 Foundation.NSObject.FromObject(color.ToPlatform().CGColor),
Platform\iOS\ButtonExtensions.cs (1)
36 var color = button.TextColor.ToPlatform();
Platform\iOS\ColorExtensions.cs (6)
46 return new Color(.32f, .4f, .57f).ToPlatform(); 102 return Color.FromRgba(50, 79, 133, 255).ToPlatform(); 141 return color.ToPlatform().CGColor; 169 => color?.ToPlatform() ?? defaultColor?.ToPlatform(); 172 => color?.ToPlatform() ?? defaultColor;
Platform\iOS\DatePickerExtensions.cs (1)
46 platformDatePicker.TextColor = textColor.ToPlatform();
Platform\iOS\MauiCALayer.cs (2)
127 _backgroundColor = solidPaint.Color.ToPlatform(); 182 : solidPaint.Color.ToPlatform();
Platform\iOS\MauiCheckBox.cs (1)
97 CheckBoxTintUIColor = CheckBoxTintColor?.ToPlatform();
Platform\iOS\MauiSwipeView.cs (1)
254 BackgroundColor = Colors.Transparent.ToPlatform()
Platform\iOS\PickerExtensions.cs (2)
16 platformPicker.TextColor = picker.TextColor?.ToPlatform(); 33 platformPicker.UpdateAttributedPlaceholder(new NSAttributedString(title, null, titleColor.ToPlatform()));
Platform\iOS\ProgressBarExtensions.cs (1)
15 platformProgressBar.ProgressTintColor = progress.ProgressColor?.ToPlatform();
Platform\iOS\SearchBarExtensions.cs (6)
39 uiSearchBar.BarTintColor = solidPaint.Color.ToPlatform(); 71 : new NSAttributedString(str: placeholder, foregroundColor: foregroundColor.ToPlatform()); 140 cancelButton.SetTitleColor(searchBar.CancelButtonColor.ToPlatform(), UIControlState.Normal); 141 cancelButton.SetTitleColor(searchBar.CancelButtonColor.ToPlatform(), UIControlState.Highlighted); 142 cancelButton.SetTitleColor(searchBar.CancelButtonColor.ToPlatform(), UIControlState.Disabled); 145 cancelButton.TintColor = searchBar.CancelButtonColor.ToPlatform();
Platform\iOS\ShadowExtensions.cs (1)
27 var color = paintColor.ToPlatform();
Platform\iOS\SliderExtensions.cs (3)
29 uiSlider.MinimumTrackTintColor = slider.MinimumTrackColor.ToPlatform(); 35 uiSlider.MaximumTrackTintColor = slider.MaximumTrackColor.ToPlatform(); 41 uiSlider.ThumbTintColor = slider.ThumbColor.ToPlatform();
Platform\iOS\SwitchExtensions.cs (2)
34 uiSwitch.OnTintColor = view.TrackColor.ToPlatform(); 46 uiSwitch.ThumbTintColor = thumbColor?.ToPlatform();
Platform\iOS\TabbedViewExtensions.cs (5)
46 var effectiveBarColor = (barBackgroundColor == null) ? defaultBarColor : barBackgroundColor.ToPlatform(); 55 var effectiveSelectedBarTextColor = (selectedBarTextColor == null) ? defaultBarTextColor : selectedBarTextColor.ToPlatform(); 56 var effectiveUnselectedBarTextColor = (unSelectedBarTextColor == null) ? defaultBarTextColor : unSelectedBarTextColor.ToPlatform(); 64 var foregroundColor = selectedTabColor.ToPlatform(); 93 var foregroundColor = unselectedTabColor.ToPlatform();
Platform\iOS\TextFieldExtensions.cs (3)
84 : new NSAttributedString(str: placeholder, foregroundColor: foregroundColor.ToPlatform()); 213 clearButton.TintColor = entry.TextColor.ToPlatform(); 215 var tintedClearImage = GetClearButtonTintImage(defaultClearImage, entry.TextColor.ToPlatform());
Platform\iOS\TextViewExtensions.cs (2)
24 textView.TextColor = textColor.ToPlatform(); 140 textView.PlaceholderTextColor = editor.PlaceholderColor?.ToPlatform() ?? ColorExtensions.PlaceholderColor;
Platform\iOS\UIPageControlExtensions.cs (2)
35 => pageControl.PageIndicatorTintColor = indicatorView.IndicatorColor?.ToColor()?.ToPlatform(); 38 => pageControl.CurrentPageIndicatorTintColor = indicatorView.SelectedIndicatorColor?.ToColor()?.ToPlatform();
Platform\iOS\ViewExtensions.cs (1)
94 platformView.BackgroundColor = backgroundColor.ToPlatform();
Microsoft.Maui.Controls (62)
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (3)
101 _clickOffView.BackgroundColor = new Color(0, 0, 0, 0).ToPlatform(); 524 View.BackgroundColor = Element.BackgroundColor.ToPlatform(); 556 detailRenderer.ViewController.View.Superview.BackgroundColor = Microsoft.Maui.Graphics.Colors.Black.ToPlatform();
Compatibility\Handlers\ListView\iOS\CellRenderer.cs (2)
118 uiBgColor = defaultBgColor.ToPlatform(); 129 uiBgColor = element.BackgroundColor.ToPlatform();
Compatibility\Handlers\ListView\iOS\EntryCellRenderer.cs (2)
133 cell.TextLabel.TextColor = entryCell.LabelColor?.ToPlatform() ?? DefaultTextColor.ToPlatform();
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (3)
114 _backgroundUIView.BackgroundColor = backgroundColor.ToPlatform(); 725 Control.SeparatorColor = color?.ToPlatform() ?? Microsoft.Maui.Platform.ColorExtensions.SeparatorColor; 760 _tableViewController.UpdateRefreshControlColor(color == null ? null : color.ToPlatform());
Compatibility\Handlers\ListView\iOS\SwitchCellRenderer.cs (1)
129 uiSwitch.OnTintColor = switchCell.OnColor.ToPlatform();
Compatibility\Handlers\ListView\iOS\TextCellRenderer.cs (6)
37 tvc.TextLabel.TextColor = (textCell.TextColor ?? DefaultTextColor).ToPlatform(); 38 tvc.DetailTextLabel.TextColor = (textCell.DetailColor ?? DefaultDetailColor).ToPlatform(); 68 tvc.TextLabel.TextColor = textCell.TextColor?.ToPlatform() ?? DefaultTextColor.ToPlatform(); 70 tvc.DetailTextLabel.TextColor = textCell.DetailColor?.ToPlatform() ?? DefaultTextColor.ToPlatform();
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (6)
711 var color = Element.BackgroundColor == null ? Maui.Platform.ColorExtensions.BackgroundColor : Element.BackgroundColor.ToPlatform(); 745 navigationBarAppearance.BackgroundColor = barBackgroundColor.ToPlatform(); 770 : barBackgroundColor.ToPlatform(); 786 ForegroundColor = barTextColor == null ? globalTitleTextAttributes?.ForegroundColor : barTextColor.ToPlatform(), 798 ForegroundColor = barTextColor == null ? globalLargeTitleTextAttributes?.ForegroundColor : barTextColor.ToPlatform(), 829 : iconColor.ToPlatform();
Compatibility\Handlers\Shell\iOS\SafeShellTabBarAppearanceTracker.cs (5)
102 tabBar.BarTintColor = backgroundColor.ToPlatform(); 106 tabBar.UnselectedItemTintColor = unselectedColor.ToPlatform(); 107 UITabBarItem.Appearance.SetTitleTextAttributes(new UIStringAttributes { ForegroundColor = unselectedColor.ToPlatform() }, UIControlState.Normal); 113 tabBar.TintColor = (foregroundColor ?? titleColor).ToPlatform(); 114 UITabBarItem.Appearance.SetTitleTextAttributes(new UIStringAttributes { ForegroundColor = (titleColor ?? foregroundColor).ToPlatform() }, UIControlState.Selected);
Compatibility\Handlers\Shell\iOS\SearchHandlerAppearanceTracker.cs (7)
167 backgroundView.BackgroundColor = backGroundColor.ToPlatform(); 184 var cancelUIColor = cancelColor.ToPlatform(); 232 textField.TextColor = targetColor?.ToPlatform() ?? _defaultTextColor; 240 _uiSearchBar.TintColor = targetColor?.ToPlatform() ?? _defaultTintColor; 265 uiButton.TintColor = targetColor?.ToPlatform() ?? _defaultPlaceholderTintColor; 361 imageView.TintColor = targetColor?.ToPlatform() ?? defaultTintColor; 376 button.TintColor = button.ImageView.TintColor = targetColor?.ToPlatform() ?? defaultTintColor;
Compatibility\Handlers\Shell\iOS\ShellFlyoutContentRenderer.cs (1)
237 View.BackgroundColor = backgroundImage is not null ? UIColor.FromPatternImage(backgroundImage) : color?.ToPlatform() ?? Maui.Platform.ColorExtensions.BackgroundColor;
Compatibility\Handlers\Shell\iOS\ShellItemRenderer.cs (1)
337 cell.TextLabel.TextColor = Color.FromRgb(213, 213, 213).ToPlatform();
Compatibility\Handlers\Shell\iOS\ShellNavBarAppearanceTracker.cs (6)
114 navBar.TintColor = foreground.ToPlatform(); 120 navigationBarAppearance.BackgroundColor = background.ToPlatform(); 126 navigationBarAppearance.TitleTextAttributes = new UIStringAttributes() { ForegroundColor = titleColor.ToPlatform() }; 146 navBar.BarTintColor = background.ToPlatform(); 148 navBar.TintColor = foreground.ToPlatform(); 155 ForegroundColor = titleColor.ToPlatform()
Compatibility\Handlers\Shell\iOS\ShellRenderer.cs (1)
358 var color = Shell.BackgroundColor?.ToPlatform();
Compatibility\Handlers\Shell\iOS\ShellSectionRootHeader.cs (6)
44 CollectionView.BackgroundColor = new Color(backgroundColor.Red, backgroundColor.Green, backgroundColor.Blue, .863f).ToPlatform(); 103 headerCell.SelectedColor = _selectedColor.ToPlatform(); 104 headerCell.UnSelectedColor = _unselectedColor.ToPlatform(); 123 cell.Label.TextColor = _unselectedColor.ToPlatform(); 136 cell.Label.TextColor = _selectedColor.ToPlatform(); 186 _bottomShadow.BackgroundColor = Colors.Black.MultiplyAlpha(0.3f).ToPlatform();
Compatibility\Handlers\TabbedPage\iOS\TabbedRenderer.cs (5)
356 TabBar.BarTintColor = isDefaultColor ? _defaultBarColor : barBackgroundColor.ToPlatform(); 393 tabBarTextColor = barTextColor.ToPlatform(); 408 TabBar.TintColor = isDefaultColor ? _defaultBarTextColor : barTextColor.ToPlatform(); 480 TabBar.TintColor = tabbed.SelectedTabColor.ToPlatform(); 492 TabBar.UnselectedItemTintColor = tabbed.UnselectedTabColor.ToPlatform();
Compatibility\Handlers\TableView\iOS\TableViewModelRenderer.cs (1)
104 header.TextLabel.TextColor = sectionHeaderTextColor.ToPlatform();
Compatibility\iOS\Extensions\ToolbarItemExtensions.cs (1)
114 TintColor = fontImageSource.Color.ToPlatform();
Platform\iOS\ControlsModalWrapper.cs (1)
195 View!.BackgroundColor = modalBkgndColor?.ToPlatform() ?? Maui.Platform.ColorExtensions.BackgroundColor;
Platform\iOS\Extensions\BrushExtensions.cs (1)
251 CGColor nativeColor = color.ToPlatform().ColorWithAlpha(0.0f).CGColor;
Platform\iOS\Extensions\FormattedStringExtensions.cs (2)
113 (span.TextColor ?? defaultColor)?.ToPlatform(), 114 span.BackgroundColor?.ToPlatform(),
Platform\iOS\Extensions\TextExtensions.cs (1)
22 textField.TintColor = color.ToPlatform();
Microsoft.Maui.Controls.Compatibility (71)
iOS\Cells\CellRenderer.cs (2)
89 uiBgColor = defaultBgColor.ToPlatform(); 100 uiBgColor = element.BackgroundColor.ToPlatform();
iOS\Cells\SwitchCellRenderer.cs (1)
129 uiSwitch.OnTintColor = switchCell.OnColor.ToPlatform();
iOS\Extensions\CompatibilityColorExtensions.cs (3)
28 return color.ToPlatform(); 33 => color?.ToPlatform() ?? defaultColor?.ToUIColor(); 37 => color?.ToPlatform() ?? defaultColor;
iOS\Platform.cs (4)
439 var window = new UIWindow { BackgroundColor = Colors.Transparent.ToPlatform() }; 462 var window = new UIWindow { BackgroundColor = Colors.Transparent.ToPlatform() }; 484 var window = new UIWindow { BackgroundColor = Colors.Transparent.ToPlatform() }; 513 window.RootViewController.View.BackgroundColor = Colors.Transparent.ToPlatform();
iOS\Renderers\ActivityIndicatorRenderer.cs (1)
80 Control.Color = Element.Color == null ? null : Element.Color.ToPlatform();
iOS\Renderers\BoxRenderer.cs (3)
94 _colorToRenderer = elementColor.ToPlatform(); 96 _colorToRenderer = color.ToPlatform(); 116 _colorToRenderer = solidColorBrush.Color.ToPlatform();
iOS\Renderers\ButtonRenderer.cs (3)
167 UIColor backgroundColor = Element.BackgroundColor == null ? null : Element.BackgroundColor.ToPlatform(); 172 backgroundColor = solidColorBrush.Color.ToPlatform(); 229 var color = Element.TextColor.ToPlatform();
iOS\Renderers\CarouselPageRenderer.cs (1)
374 View.BackgroundColor = Element.BackgroundColor.ToPlatform();
iOS\Renderers\DatePickerRenderer.cs (1)
257 Control.TextColor = textColor.ToPlatform();
iOS\Renderers\EditorRenderer.cs (2)
97 _placeholderLabel.TextColor = placeholderColor?.ToPlatform() ?? _defaultPlaceholderColor; 367 => TextView.TextColor = Element.TextColor?.ToPlatform() ?? ColorExtensions.LabelColor;
iOS\Renderers\EntryRenderer.cs (3)
281 Control.TextColor = textColor == null || !Element.IsEnabled ? _defaultTextColor : textColor.ToPlatform(); 285 Control.TextColor = textColor == null ? _defaultTextColor : textColor.ToPlatform(); 528 control.TintColor = color.ToPlatform();
iOS\Renderers\FormsCheckBox.cs (1)
91 CheckBoxTintUIColor = CheckBoxTintColor?.ToPlatform();
iOS\Renderers\ImageRenderer.cs (1)
255 var attString = new NSAttributedString(fontsource.Glyph, font: font, foregroundColor: iconcolor.ToPlatform());
iOS\Renderers\IndicatorViewRenderer.cs (2)
218 UIPager.PageIndicatorTintColor = color?.ToPlatform() ?? _defaultPagesIndicatorTintColor; 227 UIPager.CurrentPageIndicatorTintColor = color?.ToPlatform() ?? _defaultCurrentPagesIndicatorTintColor;
iOS\Renderers\LabelRenderer.cs (1)
330 BackgroundColor = color.ToPlatform();
iOS\Renderers\ListViewRenderer.cs (2)
143 _backgroundUIView.BackgroundColor = backgroundColor.ToPlatform(); 783 _tableViewController.UpdateRefreshControlColor(color == null ? null : color.ToPlatform());
iOS\Renderers\NavigationRenderer.cs (6)
667 View.BackgroundColor = color.ToPlatform(); 688 navigationBarAppearance.BackgroundColor = barBackgroundColor.ToPlatform(); 703 : barBackgroundColor.ToPlatform(); 719 ForegroundColor = barTextColor == null ? globalTitleTextAttributes?.ForegroundColor : barTextColor.ToPlatform(), 731 ForegroundColor = barTextColor == null ? globalLargeTitleTextAttributes?.ForegroundColor : barTextColor.ToPlatform(), 762 : iconColor.ToPlatform();
iOS\Renderers\PageRenderer.cs (1)
485 NativeView.BackgroundColor = Element.BackgroundColor?.ToPlatform() ?? Maui.Platform.ColorExtensions.BackgroundColor;
iOS\Renderers\PhoneFlyoutPageRenderer.cs (3)
89 _clickOffView.BackgroundColor = new Color(0, 0, 0, 0).ToPlatform(); 353 View.BackgroundColor = Element.BackgroundColor.ToPlatform(); 390 detailRenderer.ViewController.View.Superview.BackgroundColor = Microsoft.Maui.Graphics.Colors.Black.ToPlatform();
iOS\Renderers\PickerRenderer.cs (1)
309 Control.TextColor = textColor.ToPlatform();
iOS\Renderers\ProgressBarRenderer.cs (2)
59 Control.TrackTintColor = color != null ? color.ToPlatform() : null; 65 Control.ProgressTintColor = Element.ProgressColor == null ? null : Element.ProgressColor.ToPlatform();
iOS\Renderers\RefreshViewRenderer.cs (2)
99 _refreshControl.BackgroundColor = color?.ToPlatform(); 232 _refreshControl.TintColor = Element.RefreshColor.ToPlatform();
iOS\Renderers\SearchBarRenderer.cs (5)
291 cancelButton.SetTitleColor(Element.CancelButtonColor.ToPlatform(), UIControlState.Normal); 292 cancelButton.SetTitleColor(Element.CancelButtonColor.ToPlatform(), UIControlState.Highlighted); 300 cancelButton.SetTitleColor(Element.CancelButtonColor.ToPlatform(), UIControlState.Disabled); 382 _textField.TextColor = color.ToPlatform(); 386 _textField.TextColor = targetColor == null ? _defaultTextColor : targetColor.ToPlatform();
iOS\Renderers\SliderRenderer.cs (3)
118 Control.MinimumTrackTintColor = Element.MinimumTrackColor.ToPlatform(); 130 Control.MaximumTrackTintColor = Element.MaximumTrackColor.ToPlatform(); 142 Control.ThumbTintColor = Element.ThumbColor.ToPlatform();
iOS\Renderers\SwipeViewRenderer.cs (5)
169 BackgroundColor = Element.BackgroundColor.ToPlatform(); 416 BackgroundColor = Colors.Transparent.ToPlatform() 600 BackgroundColor = formsSwipeItem.BackgroundColor.ToPlatform() 612 swipeItem.SetTitleColor(textColor.ToPlatform(), UIControlState.Normal); 704 swipeButton.TintColor = tintColor.ToPlatform();
iOS\Renderers\SwitchRenderer.cs (2)
65 Control.OnTintColor = Element.OnColor.ToPlatform(); 76 Control.ThumbTintColor = thumbColor?.ToPlatform() ?? _defaultThumbColor;
iOS\Renderers\TabbedRenderer.cs (5)
369 TabBar.BarTintColor = isDefaultColor ? _defaultBarColor : barBackgroundColor.ToPlatform(); 406 tabBarTextColor = barTextColor.ToPlatform(); 418 TabBar.TintColor = isDefaultColor ? _defaultBarTextColor : barTextColor.ToPlatform(); 489 TabBar.TintColor = Tabbed.SelectedTabColor.ToPlatform(); 497 TabBar.UnselectedItemTintColor = Tabbed.UnselectedTabColor.ToPlatform();
iOS\Renderers\TabletFlyoutPageRenderer.cs (1)
518 View.BackgroundColor = Element.BackgroundColor.ToPlatform();
iOS\Renderers\TableViewModelRenderer.cs (1)
76 header.TextLabel.TextColor = sectionHeaderTextColor.ToPlatform();
iOS\Renderers\TimePickerRenderer.cs (1)
202 Control.TextColor = textColor.ToPlatform();
iOS\ViewRenderer.cs (1)
217 Control.BackgroundColor = color.ToPlatform();
iOS\VisualElementRenderer.cs (1)
388 BackgroundColor = color.ToPlatform();
Microsoft.Maui.Maps (2)
Handlers\MapElement\MapElementHandler.iOS.cs (2)
31 var platformColor = mapElement.Stroke.ToColor()?.ToPlatform(); 55 var platformColor = filledMapElement.Fill?.ToColor()?.ToPlatform();