Expand description
ferroui-xaml-interactivity
The object model of the behaviors of FerroUI, ported from the Xaml.Behaviors.Interactivity
project of Xaml.Behaviors (see NOTICE.md):
- the attached property
Interaction::behaviors_propertyand itsBehaviorCollection, which attaches its behaviors to the host and replays the lifecycle of the host to them (initialized, attached to the logical tree, attached to the visual tree, loaded), phase by phase across the behaviors, including the behaviors added while it does so; - the contracts
IBehavior,ITrigger,IAction,IReversibleActionandIBehaviorEventsHandler; - the behaviors, triggers and actions that are plain objects (
Behavior,Trigger,Action) and the ones that are styled elements and join the logical tree of their host (StyledElementBehavior,StyledElementTrigger,StyledElementAction), with their typed forms (BehaviorOfT,StyledElementBehaviorOfT, ..); - the base classes of event triggers, command behaviors and actions, and disposing behaviors;
- the templates that let a style set behaviors and actions (
BehaviorCollectionTemplate,ActionCollectionTemplate) or other objects (ObjectTemplate,NotificationTemplate); - the helpers the other behavior crates use: properties and methods by name, conversions and comparisons of untyped values, command state, reversible property changes.
The namespace of the crate is FerroUI.Xaml.Interactivity, mapped into the default XML
namespace of the framework: documents name its types without a prefix once
register_types ran.
Re-exports§
pub use crate::helpers::CommandCanExecuteObserver;pub use crate::helpers::ReversiblePropertyChange;pub use crate::styled_element::StyledElementAction;pub use crate::styled_element::StyledElementActionImpl;pub use crate::styled_element::StyledElementActionImplExt;pub use crate::styled_element::StyledElementActionVTable;pub use crate::styled_element::StyledElementBehavior;pub use crate::styled_element::StyledElementBehaviorImpl;pub use crate::styled_element::StyledElementBehaviorImplExt;pub use crate::styled_element::StyledElementBehaviorOfT;pub use crate::styled_element::StyledElementBehaviorVTable;pub use crate::styled_element::StyledElementTrigger;pub use crate::styled_element::StyledElementTriggerOfT;
Modules§
- helpers
- The helpers of the object model (
Helpers/): command state, property and method lookup by name, conversions and comparisons of untyped values, and reversible property changes.
Structs§
- Action
- A base class for action that calls a method on a specified object when invoked.
- Action
Collection - Represents a collection of
IActions. - Action
Collection Template - A template for creating a collection of
IActionobjects. - ActionV
Table - The virtual table of the class.
- AddEvent
Handler Registry - A registry for adding event handlers to various controls: the events an event trigger subscribes by name before it looks for the event in the metadata of the source.
- Behavior
- A base class for behaviors, implementing the basic plumbing of
IBehavior. - Behavior
Collection - Represents a collection of
IBehaviors with a sharedassociated_object. - Behavior
Collection Template - A template for creating a collection of
IBehaviorobjects. - Behavior
OfT - A base class for behaviors making them code compatible with older frameworks, and allow for
typed associated objects (
Behavior<T>). - BehaviorV
Table - The virtual table of the class.
- Condition
- Represents a reusable comparison that can be used by triggers and behaviors.
- Condition
Collection - Represents a collection of
Conditionobjects. - Disposable
Action - Represents an
IDisposablethat executes a specified action when disposed. - Disposing
Behavior - A base class for behaviors with disposable resources: the resource
on_attached_overridecreates is disposed when the behavior is detached. - Disposing
BehaviorV Table - The virtual table of the class.
- Disposing
Trigger - A base class for triggers that require a disposable resource: the resource
on_attached_overridecreates is disposed when the trigger is detached. - Disposing
TriggerV Table - The virtual table of the class.
- Event
Trigger Base - A behavior that listens for a specified event on its source and executes its actions when that event is fired.
- Event
Trigger BaseV Table - The virtual table of the class.
- Func
AddEvent Handler - An
IAddEventHandlerfor the eventnameof sources of typeTTarget, from a function that subscribes a handler and a function that removes it. - Interaction
- Defines a
BehaviorCollectionattached property and provides a method for executing anActionCollection. - Interactive
Behavior Base - Base class for behaviors that listen for routed events (a behavior attached to an
Interactive). - Interactive
Trigger Base - Base class for triggers that listen for routed events (a trigger attached to an
Interactive). - Invoke
Command Action Base - Command action base class: an action that invokes a command, reports whether the command can
execute (
can_execute_command) and can make the input element of its trigger follow it (use_command_can_execute_for_is_enabled). - Invoke
Command Behavior Base - Invoke command behavior base class: a behavior of a
Controlthat invokes a command, reports whether the command can execute (can_execute_command) and can make the control follow it (use_command_can_execute_for_is_enabled). - Notification
Template - A template for creating notifications: each
buildcreates a new notification from the content. - Object
Template - A template for creating custom objects: each
buildcreates a new object from the content. - Styled
Element Action - A base class for action that calls a method on a specified object when invoked.
- Styled
Element ActionV Table - The virtual table of the class.
- Styled
Element Behavior - A base class for behaviors, implementing the basic plumbing of
IBehavior. - Styled
Element Behavior OfT - A base class for behaviors making them code compatible with older frameworks, and allow for
typed associated objects (
StyledElementBehavior<T>). - Styled
Element BehaviorV Table - The virtual table of the class.
- Styled
Element Trigger - A base class for behaviors, implementing the basic plumbing of
ITrigger. - Styled
Element Trigger OfT - A base class for behaviors, implementing the basic plumbing of
ITrigger, with a typed associated object (StyledElementTrigger<T>). - Trigger
- A base class for behaviors, implementing the basic plumbing of
ITrigger. - Trigger
OfT - A base class for behaviors, implementing the basic plumbing of
ITrigger, with a typed associated object (Trigger<T>).
Enums§
- Comparison
Condition Type - Represents one ternary condition.
Statics§
- ASSEMBLY
- What this crate states about itself for markup: its assembly name and the namespace the XML namespace of the framework maps to.
Traits§
- Action
Impl - The overridable members introduced by the class.
- Action
Impl Ext - Access to the base implementations of the overridable members.
- Behavior
Impl - The overridable members introduced by the class.
- Behavior
Impl Ext - Access to the base implementations of the overridable members.
- Disposing
Behavior Impl - The overridable members introduced by the class.
- Disposing
Behavior Impl Ext - Access to the base implementations of the overridable members.
- Disposing
Trigger Impl - The overridable members introduced by the class.
- Disposing
Trigger Impl Ext - Access to the base implementations of the overridable members.
- Event
Args Value - The event args of an event as the untyped value an
IAddEventHandlerpasses on (the args are an object in the reference). - Event
Trigger Base Impl - The overridable members introduced by the class.
- Event
Trigger Base Impl Ext - Access to the base implementations of the overridable members.
- Ferro
Object Behaviors Extensions - Surfaces
Interaction::behaviors_propertydirectly onFerroObject: the static membersFerroObject::behaviors_property(),FerroObject::get_behaviors(..)andFerroObject::set_behaviors(..)when this trait is in scope. - IAction
- Interface implemented by all custom actions.
- IAdd
Event Handler - A service that provides a way to register event handlers for specific events on various controls.
- IBehavior
- Interface implemented by all custom behaviors.
- IBehavior
Events Handler - Interface implemented by base behaviors: the lifecycle callbacks of the host that a behavior collection forwards to its behaviors.
- IReversible
Action - Interface for actions that can revert the effect of a previous
IAction::executecall. - ITrigger
- Interface implemented by all custom triggers.
- Styled
Element Action Impl - The overridable members introduced by the class.
- Styled
Element Action Impl Ext - Access to the base implementations of the overridable members.
- Styled
Element Behavior Impl - The overridable members introduced by the class.
- Styled
Element Behavior Impl Ext - Access to the base implementations of the overridable members.
Functions§
- register_
types - Registers the namespace, the types, the markup metadata and the assembly of this crate (and of the crates it is built on). Cheap and idempotent.
Type Aliases§
- AddEvent
Handler Callback - The handler an
IAddEventHandlersubscribes: it receives the sender (if the event has one) and the event args, untyped (Action<object?, object>). - Event
Handler - The handler
FuncAddEventHandlergives to the subscription function: the sender and the typed event args (EventHandler<TEventArgs>).