Search Results for

    Show / Hide Table of Contents

    Class SingleToggleCommand

    A base toggle view command that provides an implemention of the IHasToggleStatus derived from a function stating if the item is toggled, and an action to toggle it

    This can be used for simple toggle states that do not need to track events or other UI wiring

    Inheritance
    object
    BaseHasChildren<EPCommandWithDescriptor>
    EPCommand
    EPCommandWithDescriptor
    ViewCommand
    ViewToggleCommand
    SingleToggleCommand
    IsPublic
    Lockable
    ViewCancelledItems
    ViewDeactivatedGLAccountItems
    ViewSystemItems
    FoldersController.ShowHiddenFolders
    ToggleAllFolders
    LayoutDesigner.LockDesign
    Implements
    IHasChildren<EPCommandWithDescriptor>
    IHasChildren
    IDisposable
    IEPCommandWithDescriptor
    IEPCommand
    ICommand
    ICommandDescriptor
    Inherited Members
    ViewCommand.Type
    ViewCommand.IncludeInSimple
    EPCommandWithDescriptor.Title
    EPCommandWithDescriptor.IconID
    EPCommandWithDescriptor.OverlayIconID
    EPCommandWithDescriptor.Description
    EPCommandWithDescriptor.ToolTip
    EPCommandWithDescriptor.Parameter
    EPCommandWithDescriptor.HelpURL
    EPCommand.OnCanExecuteChanged()
    EPCommand.LoadChildrenAsync()
    EPCommand.SetToggler(IHasToggleStatus)
    EPCommand.OnLayoutsChanged(IModelLayoutHost, LayoutChangeEventArgs)
    EPCommand.ExternalExecute(object)
    EPCommand.InternalExecuteAsync(object)
    EPCommand.ExternalCanExecute(object)
    EPCommand.InternalCanExecuteAsync(object)
    EPCommand.GetModifierText(IEPCommand)
    EPCommand.RemoveEventHandlersOnDispose()
    EPCommand.Dispose(bool)
    EPCommand.Dispose()
    EPCommand.RootController
    EPCommand.ActiveDisplayerFromOwner
    EPCommand.ReloadChildrenOnEachOpen
    EPCommand.HasChildCommands
    EPCommand.SubscribeToLayoutChange
    EPCommand.From
    EPCommand.LockExecution
    EPCommand.CustomType
    EPCommand.Key
    EPCommand.ModifierKeys
    EPCommand.Owner
    EPCommand.Toggler
    EPCommand.IsQuickAccessCommand
    EPCommand.CanExecuteChanged
    BaseHasChildren<EPCommandWithDescriptor>.AddChild(EPCommandWithDescriptor, bool)
    BaseHasChildren<EPCommandWithDescriptor>.DeleteChild(EPCommandWithDescriptor)
    BaseHasChildren<EPCommandWithDescriptor>.ClearChildren()
    BaseHasChildren<EPCommandWithDescriptor>.ClearMyParent()
    BaseHasChildren<EPCommandWithDescriptor>.AddChild(IHasChildren)
    BaseHasChildren<EPCommandWithDescriptor>.DeleteChild(IHasChildren)
    BaseHasChildren<EPCommandWithDescriptor>.Order
    BaseHasChildren<EPCommandWithDescriptor>.Children
    BaseHasChildren<EPCommandWithDescriptor>.Parent
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Client.Core.Commands.ViewCommands
    Assembly: LemonEdge.ClientCore.dll
    Syntax
    public abstract class SingleToggleCommand : ViewToggleCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor

    Constructors

    SingleToggleCommand(IRootController, Func<bool>, Action<bool>)

    Creates a new view SingleToggleCommand

    Declaration
    protected SingleToggleCommand(IRootController root, Func<bool> isToggled, Action<bool> toggle)
    Parameters
    Type Name Description
    IRootController root

    The root controller, for service access.

    Func<bool> isToggled

    A function that indicates the state of this toggle command

    Action<bool> toggle

    A method that indicates the toggle action is being executed

    Properties

    InExecuteCanToggle

    Returns if this command can execute the toggle action. Default is true.

    Declaration
    protected virtual bool InExecuteCanToggle { get; }
    Property Value
    Type Description
    bool

    Methods

    InternalCanExecute(object)

    True - Can always switch the toggle state of this command. Override to change

    Declaration
    public override bool InternalCanExecute(object parameter)
    Parameters
    Type Name Description
    object parameter

    The command parameter

    Returns
    Type Description
    bool

    True

    Overrides
    EPCommand.InternalCanExecute(object?)

    InternalExecute(object)

    Toggles the toggle action for this command

    Declaration
    public override void InternalExecute(object parameter)
    Parameters
    Type Name Description
    object parameter

    The command parameter

    Overrides
    EPCommand.InternalExecute(object)

    OnToggleChanged()

    Call to indicate the toggle class has had its toggle state changed

    Declaration
    public void OnToggleChanged()

    Implements

    IHasChildren<T>
    IHasChildren
    IDisposable
    IEPCommandWithDescriptor
    IEPCommand
    ICommand
    ICommandDescriptor

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    CommandExtensions.CreateCommand(EPCommand, ICommandDescriptor, CommandButtonType, bool, CommandSize)
    CommandExtensions.UpdateCommand(EPCommand, object, ICommandDescriptor, bool, CommandSize)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.