114 references to ToPlatform
Microsoft.Maui (50)
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 (7)
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(); 159 iconView.TintColor = searchBar.SearchIconColor.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)
719 var color = Element.BackgroundColor == null ? Maui.Platform.ColorExtensions.BackgroundColor : Element.BackgroundColor.ToPlatform(); 775 navigationBarAppearance.BackgroundColor = _currentBarBackgroundColor.ToPlatform(); 800 : _currentBarBackgroundColor.ToPlatform(); 816 ForegroundColor = barTextColor == null ? globalTitleTextAttributes?.ForegroundColor : barTextColor.ToPlatform(), 828 ForegroundColor = barTextColor == null ? globalLargeTitleTextAttributes?.ForegroundColor : barTextColor.ToPlatform(), 859 : 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)
336 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)
119 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.Maps (2)
Handlers\MapElement\MapElementHandler.iOS.cs (2)
31 var platformColor = mapElement.Stroke.ToColor()?.ToPlatform(); 55 var platformColor = filledMapElement.Fill?.ToColor()?.ToPlatform();