Show / Hide Table of Contents

    Interface IVisibleComponent

    Adds the ability to show/hide an entity.

    Inherited Members
    IComponent.Name
    IComponent.Entity
    IComponent.RegistrationType
    IComponent.Init(IEntity, Type)
    IComponent.AfterInit()
    System.IDisposable.Dispose()
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    [RequiredComponent(typeof(IInObjectTreeComponent), true)]
    public interface IVisibleComponent : IComponent, IDisposable, INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    UnderlyingVisible

    Gets a value indicating whether this entity underlying property is visible. If the entity was set to be visible but its parent is not visible, the entity will read as not visible. The "UnderlyingVisible" property however, will remember that the entity was set to be visible, so in case the parent will be visible, the entity will remember that it is now visible as well.

    Declaration
    bool UnderlyingVisible { get; }
    Property Value
    Type Description
    System.Boolean

    true if underlying visible; otherwise, false.

    See Also
    Visible
    | Improve this Doc View Source

    Visible

    Gets or sets a value indicating whether this entity is visible. Note that even if you set the entity to be visible, it might still appear as not visible if it's part of a tree and its parent (or the parent's parent, or the parent's grandparent, and so on) is itself not visible. However the setting will be remembered (via the UnderlyingVisible property) so if the parent will become visible the entity will also become visible if was set to be visible before.

    Declaration
    bool Visible { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if visible; otherwise, false.

    Examples
    button.TreeNode.SetParent(null); // the button has no parent
    button.Visible = true;
    Debug.WriteLine("Is button visible? {0}, button.Visible); //This will print "Is button visible? True".
    button.TreeNode.SetParent(panel); // the panel is now the parent of the button.
    panel.Visible = false;
    Debug.WriteLine("Is button visible? {0}, button.Visible); //This will print "Is button visible? False" because the parent is not visible.
    panel.Visible = true;
    Debug.WriteLine("Is button visible? {0}, button.Visible); //This will print "Is button visible? True" because both the parent and the button are visible.
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX