{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class RelayCommand | App UI | 0.5.5
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RelayCommand

    A command whose sole purpose is to relay its functionality to other objects by invoking delegates. The default return value for the CanExecute(object?) method is true. This type does not allow you to accept command parameters in the Execute(object?) and CanExecute(object?) callback methods.

    Inheritance
    object
    RelayCommand
    Implements
    IRelayCommand
    ICommand
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.AppUI.MVVM
    Assembly: solution.dll
    Syntax
    public class RelayCommand : IRelayCommand, ICommand

    Constructors

    Name Description
    RelayCommand(Action?)

    Initializes a new instance of the RelayCommand<T> class.

    RelayCommand(Action, Func<bool>)

    Initializes a new instance of the RelayCommand<T> class.

    Methods

    Name Description
    CanExecute()

    Initializes a new instance of the RelayCommand class.

    CanExecute(object?)

    Determines whether this RelayCommand can execute in its current state.

    Execute()

    Defines the method to be called when the command is invoked.

    Execute(object?)

    Executes the RelayCommand on the current command target.

    NotifyCanExecuteChanged()

    Notifies that the CanExecuteChanged property has changed.

    Events

    Name Description
    CanExecuteChanged

    Occurs when changes occur that affect whether or not the command should execute.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)