I have a button that is displayed after a certain event is passed but it isn't created in the main window. How do I add a definition to that button so that it can handle a click event? ie:
if (something == true)
{
Button Button = new Button();
Button.Height = Y;
Button.Width = X;
Save.Margin = new Thickness(XX, YY, 0, 0);
MyThing.Children.Add(button);
}