Reputation:
I want to click on a button and make a text block and another button appear. I managed to make the text block appear. How do I make the button appear. I can't seem to find a function that does so. Also, does it need to be a different private void statement. So far I have:
private void one_Click(object sender, RoutedEventArgs e)
{
oneBlock.Text = "one";
}
private void one_Click(object sender, RoutedEventArgs e)
{
one_Trans.ClickMode = "two";
}
Upvotes: 0
Views: 3532
Reputation: 11
use
protected void button1_Click(object sender, EventArgs e)
{
button2.Visible=true;
}
on the click event of button1
Upvotes: 1
Reputation: 45490
Put everything into the same event
private void one_Click(object sender, RoutedEventArgs e)
{
oneBlock.Text = "one";
one_Trans.ClickMode = "two";
button1.Visible = true;
}
Upvotes: 0
Reputation: 2372
You can do something like this:
private void button1_Click(object sender, RoutedEventArgs e)
{
button2.Visibility = Visibility.Visible;
}
XAML:
<Button x:Name="button2" Content="Button" Visibility="Collapsed"/>
More here: http://msdn.microsoft.com/en-us/library/system.windows.visibility(v=vs.95).aspx
Upvotes: 1