PlatformBehavior<TView> Class

Definition

Base class for generalized user-defined behaviors that can respond to arbitrary conditions and events when connected to the platform view hierarchy.

generic <typename TView>
 where TView : VisualElementpublic ref class PlatformBehavior abstract : Microsoft::Maui::Controls::PlatformBehavior<TView, System::Object ^>
public abstract class PlatformBehavior<TView> : Microsoft.Maui.Controls.PlatformBehavior<TView,object> where TView : VisualElement
type PlatformBehavior<'View (requires 'View :> VisualElement)> = class
    inherit PlatformBehavior<'View, obj (requires 'View :> VisualElement)>
Public MustInherit Class PlatformBehavior(Of TView)
Inherits PlatformBehavior(Of TView, Object)

Type Parameters

TView

Virtual View

Inheritance
Behavior<TView>
PlatformBehavior<TView>

Constructors

PlatformBehavior<TView>()

Properties

AssociatedType

Gets the type of the objects with which this Behavior can be associated.

(Inherited from Behavior)
BindingContext

Gets or sets an object that contains the properties that will be targeted by the bound properties that belong to this BindableObject. This is a bindable property.

(Inherited from BindableObject)
Dispatcher

Gets the dispatcher that was available when this bindable object was created, otherwise tries to find the nearest available dispatcher (probably the window's/app's).

(Inherited from BindableObject)

Methods

ApplyBindings()

Applies all the current bindings to BindingContext.

(Inherited from BindableObject)
ClearValue(BindableProperty)

Clears any value that is previously set for a bindable property.

(Inherited from BindableObject)
ClearValue(BindablePropertyKey)

Clears any value that is previously set for a bindable property, identified by its key.

(Inherited from BindableObject)
CoerceValue(BindableProperty)

Coerces the value of the specified bindable property. This is done by invoking BindableProperty.CoerceValueDelegate of the specified bindable property.

(Inherited from BindableObject)
CoerceValue(BindablePropertyKey)

Coerces the value of the specified bindable property. This is done by invoking BindableProperty.CoerceValueDelegate of the specified bindable property.

(Inherited from BindableObject)
GetValue(BindableProperty)

Returns the value that is contained in the given bindable property.

(Inherited from BindableObject)
IsSet(BindableProperty)

Determines whether or not a bindable property exists and has a value set.

(Inherited from BindableObject)
OnAttachedTo(BindableObject)

Application developers override this method to implement the behaviors that will be associated with bindable.

(Inherited from PlatformBehavior<TView,TPlatformView>)
OnAttachedTo(TView, TPlatformView)

This method is called when the bindable is attached to the platform view hierarchy.

(Inherited from PlatformBehavior<TView,TPlatformView>)
OnAttachedTo(TView)

Application developers override this method to implement the behaviors that will be associated with bindable.

(Inherited from PlatformBehavior<TView,TPlatformView>)
OnBindingContextChanged()

Raises the BindingContextChanged event.

(Inherited from BindableObject)
OnDetachedFrom(TView, TPlatformView)

This method is called when the bindable is detached from the platform view hierarchy.

(Inherited from PlatformBehavior<TView,TPlatformView>)
OnDetachingFrom(BindableObject)

Application developers override this method to remove the behaviors from bindable that were implemented in a previous call to the OnAttachedTo(BindableObject) method.

(Inherited from PlatformBehavior<TView,TPlatformView>)
OnDetachingFrom(TView)

Application developers override this method to remove the behaviors from bindable that were implemented in a previous call to the OnAttachedTo(T) method.

(Inherited from PlatformBehavior<TView,TPlatformView>)
OnPropertyChanged(String)

Raises the PropertyChanged event.

(Inherited from BindableObject)
OnPropertyChanging(String)

Raises the PropertyChanging event.

(Inherited from BindableObject)
RemoveBinding(BindableProperty)

Removes a previously set binding from a bindable property.

(Inherited from BindableObject)
SetBinding(BindableProperty, BindingBase)

Assigns a binding to a bindable property.

(Inherited from BindableObject)
SetValue(BindableProperty, Object)

Sets the value of the specified bindable property.

(Inherited from BindableObject)
SetValue(BindablePropertyKey, Object)

Sets the value of the specified bindable property.

(Inherited from BindableObject)
UnapplyBindings()

Removes all current bindings from the current context.

(Inherited from BindableObject)

Events

BindingContextChanged

Occurs when the value of the BindingContext property changes.

(Inherited from BindableObject)
PropertyChanged

Occurs when a property value changes.

(Inherited from BindableObject)
PropertyChanging

Occurs when a property value is changing.

(Inherited from BindableObject)

Explicit Interface Implementations

IDynamicResourceHandler.SetDynamicResource(BindableProperty, String) (Inherited from BindableObject)

Extension Methods

GetPropertyIfSet<T>(BindableObject, BindableProperty, T)
SetAppTheme<T>(BindableObject, BindableProperty, T, T)
SetAppThemeColor(BindableObject, BindableProperty, Color, Color)
SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String)

Creates and applies a binding to a property.

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

Creates a binding between a property on the source object and a property on the target object.

Applies to