86 references to FindMauiContext
Microsoft.Maui.Controls (86)
BindableObject.cs (7)
89 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot set the BindableProperty \"{property.PropertyName}\" because it is readonly."); 103 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot set the BindableProperty \"{property.PropertyName}\" because it is readonly."); 298 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot set the a OneWay Binding \"{targetProperty.PropertyName}\" because it is readonly."); 493 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot set the BindableProperty \"{property.PropertyName}\" because it is readonly."); 521 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot set the BindableProperty \"{property.PropertyName}\" because it is readonly."); 562 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot convert {value} to type '{property.ReturnType}'"); 568 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Value is an invalid value for {property.PropertyName}");
BindablePropertyConverter.cs (2)
84 Application.Current?.FindMauiContext()?.CreateLogger<BindablePropertyConverter>()?.LogWarning("Can't resolve properties with xml namespace prefix."); 90 Application.Current?.FindMauiContext()?.CreateLogger<BindablePropertyConverter>()?.LogWarning($"Can't resolve {value}. Accepted syntax is Type.PropertyName.");
BindingBase.cs (2)
157 Application.Current?.FindMauiContext()?.CreateLogger<BindingBase>()?.LogWarning("FormatException"); 172 Application.Current?.FindMauiContext()?.CreateLogger<BindingBase>()?.LogWarning("FormatException");
Compatibility\Handlers\ListView\iOS\CellTableViewCell.cs (1)
82 var handler = cell.ToHandler(cell.FindMauiContext());
Compatibility\Handlers\ListView\iOS\ContextActionCell.cs (1)
399 var renderer = (IPlatformViewHandler)e.RealParent.ToHandler(e.FindMauiContext());
Compatibility\Handlers\ListView\iOS\ImageCellRenderer.cs (1)
46 source.LoadImage(cell.FindMauiContext(), (result) =>
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (2)
929 _prototype = target.ToHandler(cell.FindMauiContext()); 1154 var handler = cell.ToHandler(cell.FindMauiContext());
Compatibility\Handlers\ListView\iOS\ViewCellRenderer.cs (2)
44 IMauiContext MauiContext => ViewCell?.FindMauiContext(); 171 var newRenderer = viewCell.View.ToHandler(viewCell.View.FindMauiContext());
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (2)
934 FlyoutPage.Flyout.IconImageSource.LoadImage(FlyoutPage.FindMauiContext(), result => 1917 var mauiContext = _view.FindMauiContext();
Compatibility\Handlers\Shell\iOS\ShellFlyoutContentRenderer.cs (1)
264 var mauiContext = _shellContext.Shell.FindMauiContext();
Compatibility\Handlers\Shell\iOS\ShellFlyoutLayoutManager.cs (1)
69 var renderer = Content.ToHandler(_context.Shell.FindMauiContext());
Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs (3)
71 IMauiContext MauiContext => Page?.FindMauiContext() ?? _context.Shell.FindMauiContext(); 792 source.LoadImage(source.FindMauiContext(), image =>
Compatibility\Handlers\Shell\iOS\ShellSearchResultsRenderer.cs (1)
59 Application.Current?.FindMauiContext()?.CreateLogger<ShellSearchResultsRenderer>()?.LogError(TrimmerConstants.SearchHandlerDisplayMemberNameNotSupportedWarning);
Compatibility\Handlers\Shell\iOS\ShellSectionRenderer.cs (3)
351 var renderer = (IPlatformViewHandler)page.ToHandler(_shellSection.FindMauiContext()); 501 ShellSection.Icon.LoadImage(ShellSection.FindMauiContext(), icon => 621 var renderer = (IPlatformViewHandler)page.ToHandler(_shellSection.FindMauiContext());
Compatibility\Handlers\Shell\iOS\ShellSectionRootRenderer.cs (2)
150 var application = _shellContext?.Shell?.FindMauiContext().Services.GetService<IApplication>(); 547 var renderer = (IPlatformViewHandler)page.ToHandler(shellContent.FindMauiContext());
Compatibility\Handlers\Shell\iOS\UIContainerCell.cs (2)
28 _renderer = (IPlatformViewHandler)view.ToHandler(view.FindMauiContext() ?? shell.FindMauiContext());
Compatibility\Handlers\Shell\iOS\UIContainerView.cs (1)
32 _renderer = _view.ToHandler(_view.FindMauiContext());
Compatibility\Handlers\TableView\iOS\TableViewModelRenderer.cs (1)
88 var cellRenderer = result.ToHandler(table.FindMauiContext());
Compatibility\iOS\Extensions\ToolbarItemExtensions.cs (2)
108 item.IconImageSource.LoadImage(item.FindMauiContext(), result => 194 item.IconImageSource.LoadImage(item.FindMauiContext(), result =>
DispatcherExtensions.cs (2)
18 element.FindMauiContext() is IMauiContext context && 28 app.FindMauiContext() is IMauiContext appMauiContext)
Element\Element.cs (3)
298 .FindMauiContext()? 353 .FindMauiContext()? 409 Application.Current?.FindMauiContext()?.CreateLogger<Element>()?.LogWarning($"{this} is already a child of {element}. Remove {this} from {element} before adding to {value}.");
Handlers\Items\iOS\ItemsViewLayout.cs (1)
430 Application.Current?.FindMauiContext()?.CreateLogger<ItemsViewLayout>()?.LogWarning(ex, "NSRangeException");
Handlers\Items\iOS\TemplatedCell.cs (1)
181 var renderer = TemplateHelpers.GetHandler(view, itemsView.FindMauiContext());
Handlers\Items\iOS\TemplateHelpers.cs (2)
41 var renderer = GetHandler(templateElement, itemsView.FindMauiContext()); 58 var wrapperView = new GeneralWrapperView(mauiView, itemsView.FindMauiContext());
Handlers\Items2\iOS\TemplatedCell2.cs (1)
125 var mauiContext = itemsView.FindMauiContext()!;
Interactivity\EventTrigger.cs (1)
85 Application.Current?.FindMauiContext()?.CreateLogger<EventTrigger>()?.LogWarning("Cannot attach EventTrigger to {Type}.{Event}. Check if the handler exists and if the signature is right.", bindable.GetType(), Event);
Layout\Layout.cs (1)
31 var factory = layout.FindMauiContext()?.Services?.GetService<ILayoutManagerFactory>();
ListView\ListView.cs (2)
638 Application.Current?.FindMauiContext()?.CreateLogger<ListView>()?.LogWarning("GroupHeaderTemplate and GroupDisplayBinding cannot be set at the same time, setting GroupHeaderTemplate to null"); 648 Application.Current?.FindMauiContext()?.CreateLogger<ListView>()?.LogWarning("GroupHeaderTemplate and GroupDisplayBinding cannot be set at the same time, setting GroupDisplayBinding to null");
MergedStyle.cs (1)
49 Application.Current?.FindMauiContext()?.CreateLogger<Style>()?.LogWarning("Style TargetType {FullName} is not compatible with element target type {TargetType}", value.TargetType.FullName, TargetType);
NavigationPage\NavigationPage.cs (2)
241 Application.Current?.FindMauiContext()?.CreateLogger<NavigationPage>()?.LogWarning(e, null); 881 Application.Current?.FindMauiContext()?.CreateLogger<NavigationPage>()?.LogWarning("RemovePage called for CurrentPage object. This can result in undesired behavior, consider calling PopAsync instead.");
NavigationPage\NavigationPage.Legacy.cs (1)
241 Application.Current?.FindMauiContext()?.CreateLogger<NavigationPage>()?.LogWarning("RemovePage called for CurrentPage object. This can result in undesired behavior, consider calling PopAsync instead.");
Platform\iOS\DragAndDropDelegate.cs (1)
309 Application.Current?.FindMauiContext()?.CreateLogger<DropGestureRecognizer>()?.LogWarning(dropExc, "Error sending drop event");
Platform\ModalNavigationManager\ModalNavigationManager.cs (2)
99 var logger = _window.FindMauiContext(true)?.Services?.CreateLogger<ModalNavigationManager>(); 105 var logger = _window.FindMauiContext(true)?.Services?.CreateLogger<ModalNavigationManager>();
RadioButton\RadioButton.cs (1)
638 Application.Current?.FindMauiContext()?.CreateLogger<RadioButton>()?.LogWarning("Warning - {RuntimePlatform} does not support View as the {PropertyName} property of RadioButton; the return value of the ToString() method will be displayed instead.", DeviceInfo.Platform, ContentProperty.PropertyName);
Registrar.cs (1)
465 fontRegistrar = Application.Current?.FindMauiContext()?.Services?.GetService<IFontRegistrar>();
Shell\Shell.cs (2)
1258 Application.Current?.FindMauiContext()?.CreateLogger<Shell>()?.LogWarning(exc, "If you're using hot reload add a route to everything in your shell file"); 1554 Application.Current?.FindMauiContext()?.CreateLogger<Shell>()?.LogWarning(exc, "Failed to Navigate Back");
Shell\ShellContent.cs (1)
75 var services = Parent?.FindMauiContext()?.Services;
Shell\ShellNavigationManager.cs (4)
118 await nextActiveSection.GoToAsync(navigationRequest, parameters, _shell.FindMauiContext()?.Services, isAnimated, isRelativePopping); 180 return _shell.CurrentItem.CurrentItem.GoToAsync(navigationRequest, parameters, _shell.FindMauiContext()?.Services, animate, isRelativePopping); 190 return _shell.CurrentItem.CurrentItem.GoToAsync(navigationRequest, parameters, _shell.FindMauiContext()?.Services, animate, isRelativePopping); 196 await _shell.CurrentItem.CurrentItem.GoToAsync(navigationRequest, parameters, _shell.FindMauiContext()?.Services, animate, isRelativePopping);
Shell\ShellSection.cs (1)
490 Application.Current?.FindMauiContext()?.CreateLogger<ShellSection>()?.LogWarning("Failed to Create Content For: {route}", route);
StreamWrapper.cs (1)
98 Application.Current?.FindMauiContext()?.CreateLogger<StreamWrapper>()?
TypeConversionHelper.cs (1)
173 Application.Current?.FindMauiContext()?.CreateLogger(nameof(TypeConversionHelper))?.LogWarning(
UriImageSource.cs (2)
75 Application.Current?.FindMauiContext()?.CreateLogger<UriImageSource>()?.LogWarning(ex, "Error getting stream for {Uri}", Uri); 126 Application.Current?.FindMauiContext()?.CreateLogger<UriImageSource>()?.LogWarning(ex, "Error getting stream for {Uri}", Uri);
ViewExtensions.cs (6)
294 if (element.FindMauiContext() is IMauiContext viewMauiContext) 297 if (Application.Current?.FindMauiContext() is IMauiContext applicationMauiContext) 305 => element.FindMauiContext(fallbackToAppMauiContext) ?? throw new InvalidOperationException($"{nameof(IMauiContext)} not found."); 318 return fallbackToAppMauiContext ? Application.Current?.FindMauiContext() : default; 322 element.FindMauiContext(fallbackToAppMauiContext)?.CreateLogger<T>(); 328 => element.FindMauiContext()?.Services?.GetService<IFontManager>()?.DefaultFontSize ?? 0d;
Visuals\VisualMarker.cs (1)
29 var logger = Application.Current?.FindMauiContext()?.CreateLogger<IVisual>();
Visuals\VisualTypeConverter.cs (5)
86 Application.Current?.FindMauiContext()?.CreateLogger<IVisual>()?.LogWarning("Cannot scan assembly {assembly} for Visual types.", assembly.FullName); 90 Application.Current?.FindMauiContext()?.CreateLogger<IVisual>()?.LogWarning("Unable to load a dependent assembly for {assembly}. It cannot be scanned for Visual types.", assembly.FullName); 94 Application.Current?.FindMauiContext()?.CreateLogger<IVisual>()?.LogWarning("Unable to load a dependent assembly for {assembly}. Types cannot be loaded.", assembly.FullName); 146 Application.Current?.FindMauiContext()?.CreateLogger<IVisual>()?.LogWarning("Unable to register {visualType} please add a public default constructor", visualType.ToString()); 165 Application.Current?.FindMauiContext()?.CreateLogger<IVisual>()?.LogWarning(
Xaml\Diagnostics\BindingDiagnostics.cs (2)
18 Application.Current?.FindMauiContext()?.CreateLogger<BindingDiagnostics>()?.LogWarning(message, messageArgs); 24 Application.Current?.FindMauiContext()?.CreateLogger<BindingDiagnostics>()?.LogWarning(message, messageArgs);