131 references to ToPlatform
Microsoft.Maui (49)
Graphics\PaintExtensions.iOS.cs (1)
182
CGColor nativeColor = color.
ToPlatform
().ColorWithAlpha(0.0f).CGColor;
Handlers\Button\ButtonHandler.iOS.cs (2)
68
config.BaseBackgroundColor = backgroundColor.
ToPlatform
();
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 (11)
Platform\Tizen\Extensions\FormattedStringExtensions.cs (2)
46
nativeSpan.ForegroundColor = textColor.
ToPlatform
();
49
nativeSpan.BackgroundColor = span.BackgroundColor.
ToPlatform
();
Platform\Tizen\Extensions\ToolbarExtensions.cs (9)
91
platformToolbar.BackgroundColor = solidColor.Color.
ToPlatform
().ToNative();
100
button.Color = toolbar.IconColor.IsNotDefault() ? toolbar.IconColor.
ToPlatform
() : platformToolbar.GetAccentColor();
107
platformToolbar.Label.TextColor = textColor.IsNotDefault() ? textColor.
ToPlatform
() : platformToolbar.GetAccentColor();
112
platformToolbar.Label.TextColor = color.IsNotDefault() ? color.
ToPlatform
() : platformToolbar.GetAccentColor();
119
button.Color = color.IsNotDefault() ? color.
ToPlatform
() : platformToolbar.GetAccentColor();
125
platformToolbar.BackgroundColor = color.IsNotDefault() ? color.
ToPlatform
().ToNative() : s_defaultBackgroundColor.ToNative();
186
Color = toolbar.IconColor.IsNotDefault() ? toolbar.IconColor.
ToPlatform
() : platformToolbar.GetAccentColor()
196
Color = toolbar.IconColor.IsNotDefault() ? toolbar.IconColor.
ToPlatform
() : platformToolbar.GetAccentColor()
206
Color = toolbar.IconColor.IsNotDefault() ? toolbar.IconColor.
ToPlatform
() : platformToolbar.GetAccentColor()
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
();