Share via


PlatformBehavior<TView,TPlatformView>.OnAttachedTo 方法

定义

重载

OnAttachedTo(BindableObject)

应用程序开发者可重写此方法以实现与 bindable 关联的行为。

OnAttachedTo(TView)

应用程序开发者可重写此方法以实现与 bindable 关联的行为。

OnAttachedTo(TView, TPlatformView)

当可绑定附加到平台视图层次结构时,将调用此方法。

OnAttachedTo(BindableObject)

应用程序开发者可重写此方法以实现与 bindable 关联的行为。

protected:
 override void OnAttachedTo(Microsoft::Maui::Controls::BindableObject ^ bindable);
protected override sealed void OnAttachedTo (Microsoft.Maui.Controls.BindableObject bindable);
override this.OnAttachedTo : Microsoft.Maui.Controls.BindableObject -> unit
Protected Overrides NotOverridable Sub OnAttachedTo (bindable As BindableObject)

参数

bindable
BindableObject

要附加行为的可绑定对象。

适用于

OnAttachedTo(TView)

应用程序开发者可重写此方法以实现与 bindable 关联的行为。

protected:
 override void OnAttachedTo(TView bindable);
protected override sealed void OnAttachedTo (TView bindable);
override this.OnAttachedTo : 'View -> unit
Protected Overrides NotOverridable Sub OnAttachedTo (bindable As TView)

参数

bindable
TView

要附加行为的可绑定对象。

适用于

OnAttachedTo(TView, TPlatformView)

当可绑定附加到平台视图层次结构时,将调用此方法。

protected:
 virtual void OnAttachedTo(TView bindable, TPlatformView platformView);
protected virtual void OnAttachedTo (TView bindable, TPlatformView platformView);
override this.OnAttachedTo : 'View * 'PlatformView -> unit
Protected Overridable Sub OnAttachedTo (bindable As TView, platformView As TPlatformView)

参数

bindable
TView

要附加行为的可绑定对象。

platformView
TPlatformView

连接到可绑定对象的平台控件。

适用于