PowerArgs.Cli.Button.Button C# (CSharp) Method

Button() public method

Creates a new button control
public Button ( ) : System
return System
        public Button()
        {
            Height = 1;
            this.Foreground = Theme.DefaultTheme.ButtonColor;
            this.SynchronizeForLifetime(nameof(Text), UpdateWidth, this.LifetimeManager);
            this.SynchronizeForLifetime(nameof(Shortcut), UpdateWidth, this.LifetimeManager);
            this.AddedToVisualTree.SubscribeForLifetime(OnAddedToVisualTree, this.LifetimeManager);
            this.KeyInputReceived.SubscribeForLifetime(OnKeyInputReceived, this.LifetimeManager);
        }