通过


BackButtonBehavior 类

定义

自定义应用程序中后退按钮 Shell 的外观和行为。

public ref class BackButtonBehavior : Microsoft::Maui::Controls::BindableObject
public class BackButtonBehavior : Microsoft.Maui.Controls.BindableObject
type BackButtonBehavior = class
    inherit BindableObject
Public Class BackButtonBehavior
Inherits BindableObject
继承
BackButtonBehavior

构造函数

名称 说明
BackButtonBehavior()

自定义应用程序中后退按钮 Shell 的外观和行为。

字段

名称 说明
CommandParameterProperty

的可绑定属性 CommandParameter

CommandProperty

的可绑定属性 Command

IconOverrideProperty

的可绑定属性 IconOverride

IsEnabledProperty

的可绑定属性 IsEnabled

IsVisibleProperty

的可绑定属性 IsVisible

TextOverrideProperty

的可绑定属性 TextOverride

属性

名称 说明
BindingContext

获取或设置一个对象,该对象包含由属于此 BindableObject属性的绑定属性所面向的属性。 这是一种可绑定属性。

(继承自 BindableObject)
Command

获取或设置在按下后退按钮时要执行的命令。 这是一种可绑定属性。

CommandParameter

获取或设置要传递给 .. 的参数 Command。 这是一种可绑定属性。

Dispatcher

获取创建此可绑定对象时可用的调度程序,否则会尝试查找最近的可用调度程序(可能是窗口的/应用)。

(继承自 BindableObject)
IconOverride

获取或设置要使用的图标,而不是默认后退按钮图标。 这是一种可绑定属性。

IsEnabled

获取或设置一个值,该值指示是否启用后退按钮。 这是一种可绑定属性。

IsVisible

获取或设置一个值,该值指示后退按钮是否可见。 这是一种可绑定属性。

TextOverride

获取或设置要显示的文本,而不是默认的后退按钮文本。 这是一种可绑定属性。

方法

名称 说明
ApplyBindings()

将所有当前绑定应用于 BindingContext

(继承自 BindableObject)
ClearValue(BindableProperty)

清除以前为可绑定属性设置的任何值。

(继承自 BindableObject)
ClearValue(BindablePropertyKey)

清除以前为其键标识的可绑定属性设置的任何值。

(继承自 BindableObject)
CoerceValue(BindableProperty)

强制指定可绑定属性的值。 这是通过调用 BindableProperty.CoerceValueDelegate 指定的可绑定属性来完成的。

(继承自 BindableObject)
CoerceValue(BindablePropertyKey)

强制指定可绑定属性的值。 这是通过调用 BindableProperty.CoerceValueDelegate 指定的可绑定属性来完成的。

(继承自 BindableObject)
GetValue(BindableProperty)

返回给定可绑定属性中包含的值。

(继承自 BindableObject)
IsSet(BindableProperty)

确定可绑定属性是否存在并设置了值。

(继承自 BindableObject)
OnBindingContextChanged()

引发 BindingContextChanged 事件。

(继承自 BindableObject)
OnPropertyChanged(String)

引发 PropertyChanged 事件。

(继承自 BindableObject)
OnPropertyChanging(String)

引发 PropertyChanging 事件。

(继承自 BindableObject)
RemoveBinding(BindableProperty)

从可绑定属性中删除以前设置的绑定。

(继承自 BindableObject)
SetBinding(BindableProperty, BindingBase)

将绑定分配给可绑定属性。

(继承自 BindableObject)
SetValue(BindableProperty, Object)

设置指定的可绑定属性的值。

(继承自 BindableObject)
SetValue(BindablePropertyKey, Object)

设置指定的可绑定属性的值。

(继承自 BindableObject)
UnapplyBindings()

从当前上下文中删除所有当前绑定。

(继承自 BindableObject)

活动

名称 说明
BindingContextChanged

BindingContext 属性的值更改时发生。

(继承自 BindableObject)
PropertyChanged

在属性值更改时发生。

(继承自 BindableObject)
PropertyChanging

在属性值更改时发生。

(继承自 BindableObject)

显式接口实现

名称 说明
IDynamicResourceHandler.SetDynamicResource(BindableProperty, String)

自定义应用程序中后退按钮 Shell 的外观和行为。

(继承自 BindableObject)

扩展方法

名称 说明
GetPropertyIfSet<T>(BindableObject, BindableProperty, T)

自定义应用程序中后退按钮 Shell 的外观和行为。

SetAppTheme<T>(BindableObject, BindableProperty, T, T)

自定义应用程序中后退按钮 Shell 的外观和行为。

SetAppThemeColor(BindableObject, BindableProperty, Color, Color)

自定义应用程序中后退按钮 Shell 的外观和行为。

SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String)

创建绑定并将其应用到属性。

SetBinding<TSource,TProperty>(BindableObject, BindableProperty, Func<TSource,TProperty>, BindingMode, IValueConverter, Object, String, Object, Object, Object)

在源对象上的属性和目标对象的属性之间创建绑定。

适用于