語言

ButtonHandler 類別

定義

public ref class ButtonHandler : Microsoft::Maui::Handlers::ViewHandler<Microsoft::Maui::IButton ^, System::Object ^>, Microsoft::Maui::Handlers::IButtonHandler
public class ButtonHandler : Microsoft.Maui.Handlers.ViewHandler<Microsoft.Maui.IButton,object>, Microsoft.Maui.Handlers.IButtonHandler
type ButtonHandler = class
    inherit ViewHandler<IButton, obj>
    interface IButtonHandler
    interface IViewHandler
    interface IElementHandler
Public Class ButtonHandler
Inherits ViewHandler(Of IButton, Object)
Implements IButtonHandler
繼承
實作

建構函式

名稱 Description
ButtonHandler()
ButtonHandler(IPropertyMapper, CommandMapper)
ButtonHandler(IPropertyMapper)

欄位

名稱 Description
CommandMapper
ImageButtonMapper
Mapper
TextButtonMapper

屬性

名稱 Description
ContainerView

取得作為容器 PlatformView的視圖。

(繼承來源 ViewHandler)
HasContainer

取得或設定一個值,指示是否 PlatformView 包含在視圖中。

(繼承來源 ViewHandler)
ImageSourceLoader
MauiContext (繼承來源 ElementHandler)
NeedsContainer

會得到一個值,指示是否 VirtualView 需要容器視圖。

(繼承來源 ViewHandler)
PlatformView (繼承來源 ViewHandler<TVirtualView,TPlatformView>)
Services (繼承來源 ElementHandler)
VirtualView (繼承來源 ViewHandler<TVirtualView,TPlatformView>)

方法

名稱 Description
ConnectHandler(TPlatformView) (繼承來源 ViewHandler<TVirtualView,TPlatformView>)
CreatePlatformView()
DisconnectHandler(TPlatformView) (繼承來源 ViewHandler<TVirtualView,TPlatformView>)
GetDesiredSize(Double, Double) (繼承來源 ViewHandler<TVirtualView,TPlatformView>)
Invoke(String, Object) (繼承來源 ElementHandler)
MapCharacterSpacing(IButtonHandler, ITextStyle)
MapCornerRadius(IButtonHandler, IButtonStroke)
MapFont(IButtonHandler, ITextStyle)
MapImageSource(IButtonHandler, IImage)
MapPadding(IButtonHandler, IButton)
MapStrokeColor(IButtonHandler, IButtonStroke)
MapStrokeThickness(IButtonHandler, IButtonStroke)
MapText(IButtonHandler, IText)
MapTextColor(IButtonHandler, ITextStyle)
PlatformArrange(Rect) (繼承來源 ViewHandler<TVirtualView,TPlatformView>)
RemoveContainer() (繼承來源 ViewHandler<TVirtualView,TPlatformView>)
SetContainerView(Object)

設定或清除由 返回的 ContainerView視圖。

(繼承來源 ViewHandler)
SetMauiContext(IMauiContext) (繼承來源 ElementHandler)
SetupContainer() (繼承來源 ViewHandler<TVirtualView,TPlatformView>)
SetVirtualView(IElement) (繼承來源 ViewHandler<TVirtualView,TPlatformView>)
SetVirtualView(IView) (繼承來源 ViewHandler<TVirtualView,TPlatformView>)
UpdateValue(String) (繼承來源 ElementHandler)
ValidateContainerView(Object)

驗證 是 containerView 該處理器支援的容器類型,若不支援則拋出。

(繼承來源 ViewHandler)

明確介面實作

名稱 Description
IButtonHandler.PlatformView
IButtonHandler.VirtualView
IElementHandler.DisconnectHandler() (繼承來源 ElementHandler)
IElementHandler.PlatformView (繼承來源 ViewHandler<TVirtualView,TPlatformView>)
IElementHandler.VirtualView (繼承來源 ViewHandler<TVirtualView,TPlatformView>)
IViewHandler.ContainerView (繼承來源 ViewHandler)
IViewHandler.VirtualView (繼承來源 ViewHandler<TVirtualView,TPlatformView>)

擴充方法

名稱 Description
GetRequiredService<T>(IElementHandler, Type)
GetRequiredService<T>(IElementHandler)
GetService<T>(IElementHandler, Type)
GetService<T>(IElementHandler)
GetServiceProvider(IElementHandler)
IsConnected(IElementHandler)

適用於