when you create a button in code you need to keep a reference to it, like you would with any C# object you want to reference later
Button MyButton = new Button { ... };
MyButton.BackgroundColor = Color.Purple;
if you need to access it from multiple places in your code, you should declare it as a class level variable to that it has scope throughout your class
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…