FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    NetworkStatusTrigger

    struct · ferroui-xaml-interactions-custom · v0.5.0

    struct NetworkStatusTrigger
    

    A trigger that fires when the network status changes.

    The availability of the network (a boolean) is the parameter of the actions.

    Deviation (DEVIATIONS.md, Behaviors): the reference listens to the availability change event of the network interfaces of .NET (NetworkChange.NetworkAvailabilityChanged) while the control is in the visual tree. The framework has no network availability service, so the port does not observe the system: an application that observes it reports a change with on_network_availability_changed, which the trigger handles while the control is in the visual tree, as the reference handles the event.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<NetworkStatusTrigger>
    

    Returns a strong reference to this object.

    Source

    status_property

    fn status_property() -> &'static StyledProperty<NetworkStatus>
    

    Identifies the Status property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a trigger.

    Source

    status

    fn status(self: &Self) -> NetworkStatus
    

    Gets or sets the network status to listen for.

    Source

    set_status

    fn set_status(self: &Self, value: NetworkStatus)
    

    Source

    on_network_availability_changed

    fn on_network_availability_changed(self: &Self, is_available: bool)
    

    Reports a change of the availability of the network (the handler of NetworkChange.NetworkAvailabilityChanged in the reference): unless the control is out of the visual tree, the actions run in a job of the dispatcher when the change matches status.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.