12 interfaces inheriting from IElementHandler
Microsoft.Maui (10)
Handlers\IViewHandler.cs (1)
8
public interface IViewHandler :
IElementHandler
Handlers\MenuBar\IMenuBarHandler.cs (1)
15
public interface IMenuBarHandler :
IElementHandler
Handlers\MenuBarItem\IMenuBarItemHandler.cs (1)
15
public interface IMenuBarItemHandler :
IElementHandler
Handlers\MenuFlyoutHandler\IMenuFlyoutHandler.cs (1)
9
public interface IMenuFlyoutHandler :
IElementHandler
Handlers\MenuFlyoutItem\IMenuFlyoutItemHandler.cs (1)
15
public interface IMenuFlyoutItemHandler :
IElementHandler
Handlers\MenuFlyoutSeparator\IMenuFlyoutSeparatorHandler.cs (1)
11
public interface IMenuFlyoutSeparatorHandler :
IElementHandler
Handlers\MenuFlyoutSubItem\IMenuFlyoutSubItemHandler.cs (1)
15
public interface IMenuFlyoutSubItemHandler :
IElementHandler
Handlers\SwipeItemMenuItem\ISwipeItemMenuItemHandler.cs (1)
15
public partial interface ISwipeItemMenuItemHandler :
IElementHandler
Handlers\Toolbar\IToolbarHandler.cs (1)
15
public partial interface IToolbarHandler :
IElementHandler
Handlers\Window\IWindowHandler.cs (1)
15
public partial interface IWindowHandler :
IElementHandler
Microsoft.Maui.Maps (2)
Handlers\MapElement\IMapElementHandler.cs (1)
18
public interface IMapElementHandler :
IElementHandler
Handlers\MapPin\IMapPinHandler.cs (1)
16
public interface IMapPinHandler :
IElementHandler
2 implementations of IElementHandler
Microsoft.Maui (2)
Handlers\Element\ElementHandler.cs (1)
5
public abstract partial class ElementHandler :
IElementHandler
Handlers\Element\ElementHandlerOfT.cs (1)
5
public abstract partial class ElementHandler<TVirtualView, TPlatformView> : ElementHandler,
IElementHandler
126 references to IElementHandler
Microsoft.Maui (100)
CommandMapper.cs (7)
3
using Command = System.Action<Microsoft.Maui.
IElementHandler
, Microsoft.Maui.IElement, object?>;
27
private protected virtual void InvokeCore(string key,
IElementHandler
viewHandler, IElement virtualView, object? args)
46
public void Invoke(
IElementHandler
viewHandler, IElement? virtualView, string property, object? args)
65
void Invoke(
IElementHandler
viewHandler, IElement? virtualView, string property, object? args);
70
where TViewHandler :
IElementHandler
79
where TViewHandler :
IElementHandler
108
public class CommandMapper<TVirtualView> : CommandMapper<TVirtualView,
IElementHandler
>
CommandMapperExtensions.cs (18)
16
string key, Action<TViewHandler, TVirtualView, object?, Action<
IElementHandler
, IElement, object?>?> method)
17
where TVirtualView : IElement where TViewHandler :
IElementHandler
29
string key, Action<TViewHandler, TVirtualView, object?, Action<
IElementHandler
, IElement, object?>?> method)
30
where TVirtualView : IElement where TViewHandler :
IElementHandler
50
public static void ModifyMapping<TVirtualView, TViewHandler>(this ICommandMapper<IElement,
IElementHandler
> commandMapper,
51
string key, Action<TViewHandler, TVirtualView, object?, Action<
IElementHandler
, IElement, object?>?> method)
52
where TVirtualView : IElement where TViewHandler :
IElementHandler
56
void newMethod(
IElementHandler
handler, IElement view, object? args)
75
public static void ReplaceMapping<TVirtualView, TViewHandler>(this ICommandMapper<IElement,
IElementHandler
> commandMapper,
77
where TVirtualView : IElement where TViewHandler :
IElementHandler
92
where TVirtualView : IElement where TViewHandler :
IElementHandler
105
where TVirtualView : IElement where TViewHandler :
IElementHandler
122
public static void AppendToMapping<TVirtualView, TViewHandler>(this ICommandMapper<IElement,
IElementHandler
> commandMapper,
124
where TVirtualView : IElement where TViewHandler :
IElementHandler
145
where TVirtualView : IElement where TViewHandler :
IElementHandler
158
where TVirtualView : IElement where TViewHandler :
IElementHandler
175
public static void PrependToMapping<TVirtualView, TViewHandler>(this ICommandMapper<IElement,
IElementHandler
> commandMapper,
177
where TVirtualView : IElement where TViewHandler :
IElementHandler
Core\IElement.cs (1)
8
IElementHandler
? Handler { get; set; }
Handlers\Element\ElementHandler.cs (5)
7
public static IPropertyMapper<IElement,
IElementHandler
> ElementMapper = new PropertyMapper<IElement,
IElementHandler
>()
11
public static CommandMapper<IElement,
IElementHandler
> ElementCommandMapper = new CommandMapper<IElement,
IElementHandler
>()
121
void
IElementHandler
.DisconnectHandler()
Handlers\Element\ElementHandlerOfT.cs (2)
31
IElement?
IElementHandler
.VirtualView => base.VirtualView;
33
object?
IElementHandler
.PlatformView => base.PlatformView;
Handlers\ElementHandlerExtensions.cs (10)
21
internal static PlatformView ToPlatform(this
IElementHandler
elementHandler) =>
25
public static IServiceProvider GetServiceProvider(this
IElementHandler
handler)
36
public static T? GetService<T>(this
IElementHandler
handler, Type type)
45
public static T? GetService<T>(this
IElementHandler
handler)
54
public static T GetRequiredService<T>(this
IElementHandler
handler, Type type)
64
public static T GetRequiredService<T>(this
IElementHandler
handler)
74
internal static Task<T> InvokeAsync<T>(this
IElementHandler
handler, string commandName,
81
internal static T InvokeWithResult<T>(this
IElementHandler
handler, string commandName,
88
internal static bool CanInvokeMappers(this
IElementHandler
viewHandler)
99
public static bool IsConnected(this
IElementHandler
handler) =>
Handlers\IViewHandler.cs (1)
11
/// Gets or sets a value that indicates whether the <see cref="
IElementHandler
.PlatformView"/> is contained within a view.
Handlers\View\ViewHandlerOfT.cs (2)
48
IElement?
IElementHandler
.VirtualView => base.VirtualView;
50
object?
IElementHandler
.PlatformView => base.PlatformView;
Hosting\IMauiHandlersFactory.cs (2)
13
IElementHandler
? GetHandler(Type type);
15
IElementHandler
? GetHandler<T>() where T : IElement;
Hosting\Internal\MauiHandlersFactory.cs (3)
22
public
IElementHandler
? GetHandler(Type type)
23
=> GetService(GetVirtualViewHandlerServiceType(type)) as
IElementHandler
;
25
public
IElementHandler
? GetHandler<T>() where T : IElement
Hosting\Internal\RegisteredHandlerServiceTypeSet.cs (2)
42
?? throw new HandlerNotFoundException($"Unable to find a {nameof(
IElementHandler
)} corresponding to {type}. Please register a handler for {type} using `Microsoft.Maui.Hosting.MauiHandlersCollectionExtensions.AddHandler` or `Microsoft.Maui.Hosting.MauiHandlersCollectionExtensions.TryAddHandler`");
70
throw new InvalidOperationException($"Unable to find a single {nameof(
IElementHandler
)} corresponding to {type}. There is an ambiguous match between {bestVirtualViewHandlerServiceType} and {registeredViewHandlerServiceType}.");
Hosting\MauiHandlersCollectionExtensions.cs (7)
23
if (!typeof(IElement).IsAssignableFrom(viewType) || !typeof(
IElementHandler
).IsAssignableFrom(handlerType))
24
throw new InvalidOperationException($"Unable to add handler mapping for {viewType} and {handlerType}. Please ensure that {viewType} implements {nameof(IElement)} and {handlerType} implements {nameof(
IElementHandler
)}.");
43
where TTypeRender :
IElementHandler
61
Func<IServiceProvider,
IElementHandler
> handlerImplementationFactory)
81
if (!typeof(IElement).IsAssignableFrom(viewType) || !typeof(
IElementHandler
).IsAssignableFrom(handlerType))
82
throw new InvalidOperationException($"Unable to add handler mapping for {viewType} and {handlerType}. Please ensure that {viewType} implements {nameof(IElement)} and {handlerType} implements {nameof(
IElementHandler
)}.");
119
Func<IServiceProvider,
IElementHandler
> handlerImplementationFactory)
Platform\ElementExtensions.cs (6)
37
static
IElementHandler
? CreateTypeWithInjection(this Type viewType, IMauiContext mauiContext)
52
return (
IElementHandler
)Extensions.DependencyInjection.
56
public static
IElementHandler
ToHandler(this IElement view, IMauiContext context)
65
var
handler = view.Handler;
127
var
handler = view.ToHandler(context);
144
var
handler = element.Handler;
Platform\IImageSourcePartSetter.cs (2)
30
/// Gets the <see cref="
IElementHandler
"/> which is doing the image loading.
32
IElementHandler
? Handler { get; }
Platform\ImageSourcePartLoader.cs (2)
43
public ImageSourcePartLoader(
IElementHandler
handler, Func<IImageSourcePart?> imageSourcePart, Action<PlatformImage?> setImage)
60
if (Setter.Handler is not
IElementHandler
handler || handler.PlatformView is not PlatformView platformView)
Platform\ImageSourcePartSetter.cs (2)
17
where T : class,
IElementHandler
29
IElementHandler
? IImageSourcePartSetter.Handler => Handler;
PropertyMapper.cs (12)
18
protected readonly Dictionary<string, Action<
IElementHandler
, IElement>> _mapper = new(StringComparer.Ordinal);
35
protected virtual void SetPropertyCore(string key, Action<
IElementHandler
, IElement> action)
41
protected virtual void UpdatePropertyCore(string key,
IElementHandler
viewHandler, IElement virtualView)
50
public virtual Action<
IElementHandler
, IElement>? GetProperty(string key)
67
public void UpdateProperty(
IElementHandler
viewHandler, IElement? virtualView, string property)
75
public void UpdateProperties(
IElementHandler
viewHandler, IElement? virtualView)
129
Action<
IElementHandler
, IElement>? GetProperty(string key);
133
void UpdateProperties(
IElementHandler
elementHandler, IElement virtualView);
135
void UpdateProperty(
IElementHandler
elementHandler, IElement virtualView, string property);
140
where TViewHandler :
IElementHandler
147
where TViewHandler :
IElementHandler
187
public class PropertyMapper<TVirtualView> : PropertyMapper<TVirtualView,
IElementHandler
>
PropertyMapperExtensions.cs (14)
16
string key, Action<TViewHandler, TVirtualView, Action<
IElementHandler
, IElement>?> method)
17
where TVirtualView : IElement where TViewHandler :
IElementHandler
37
public static void ModifyMapping<TVirtualView, TViewHandler>(this IPropertyMapper<IElement,
IElementHandler
> propertyMapper,
38
string key, Action<TViewHandler, TVirtualView, Action<
IElementHandler
, IElement>?> method)
39
where TVirtualView : IElement where TViewHandler :
IElementHandler
43
void newMethod(
IElementHandler
handler, IElement view)
62
public static void ReplaceMapping<TVirtualView, TViewHandler>(this IPropertyMapper<IElement,
IElementHandler
> propertyMapper,
64
where TVirtualView : IElement where TViewHandler :
IElementHandler
79
where TVirtualView : IElement where TViewHandler :
IElementHandler
96
public static void AppendToMapping<TVirtualView, TViewHandler>(this IPropertyMapper<IElement,
IElementHandler
> propertyMapper,
98
where TVirtualView : IElement where TViewHandler :
IElementHandler
119
where TVirtualView : IElement where TViewHandler :
IElementHandler
136
public static void PrependToMapping<TVirtualView, TViewHandler>(this IPropertyMapper<IElement,
IElementHandler
> propertyMapper,
138
where TVirtualView : IElement where TViewHandler :
IElementHandler
TaskExtensions.cs (2)
52
where T :
IElementHandler
57
static ILogger? CreateLogger<T>(this
IElementHandler
? elementHandler) =>
Microsoft.Maui.Controls (24)
Element\Element.cs (5)
954
IElementHandler
_handler;
963
/// <value>An implementation of <see cref="
IElementHandler
"/>.</value>
966
public
IElementHandler
Handler
1001
IElementHandler
_previousHandler;
1002
void SetHandler(
IElementHandler
newHandler)
Element\Element.Mapper.cs (2)
13
ViewHandler.ViewMapper.ReplaceMapping<Maui.IElement,
IElementHandler
>(AutomationProperties.IsInAccessibleTreeProperty.PropertyName, MapAutomationPropertiesIsInAccessibleTree);
14
ViewHandler.ViewMapper.ReplaceMapping<Maui.IElement,
IElementHandler
>(AutomationProperties.ExcludedWithChildrenProperty.PropertyName, MapAutomationPropertiesExcludedWithChildren);
Element\Element.Standard.cs (4)
15
public static void MapAutomationPropertiesIsInAccessibleTree(
IElementHandler
handler, Element element)
24
public static void MapAutomationPropertiesExcludedWithChildren(
IElementHandler
handler, Element element)
28
static void MapAutomationPropertiesIsInAccessibleTree(
IElementHandler
handler, IElement element)
34
static void MapAutomationPropertiesExcludedWithChildren(
IElementHandler
handler, IElement element)
HandlerChangingEventArgs.cs (4)
10
public
IElementHandler
NewHandler { get; }
11
public
IElementHandler
OldHandler { get; }
13
public HandlerChangingEventArgs(
IElementHandler
oldHandler,
IElementHandler
newHandler)
Registrar.cs (1)
520
if (typeof(
IElementHandler
).IsAssignableFrom(rendererType))
Toolbar\Toolbar.cs (5)
28
IElementHandler
_handler;
49
public
IElementHandler
Handler
57
var
oldHandler = _handler;
66
partial void OnHandlerChanging(
IElementHandler
oldHandler,
IElementHandler
newHandler);
Toolbar\ToolbarElement.cs (1)
5
internal static void SetValue(ref Toolbar? toolbar, Toolbar? value,
IElementHandler
handler)
VisualElement\VisualElement.cs (1)
2119
IElementHandler
? IElement.Handler
VisualElement\VisualElement.Mapper.cs (1)
61
static void MapFocus(IViewHandler handler, VisualElement view, object args, Action<
IElementHandler
, IElement, object> baseMethod)
Microsoft.Maui.Maps (2)
src\Core\src\TaskExtensions.cs (2)
52
where T :
IElementHandler
57
static ILogger? CreateLogger<T>(this
IElementHandler
? elementHandler) =>