How do you get the button to show the picture and the text?



  • I want the picture and the text to appear after I press the button.

    How do you do that?



  • It is possible to do so:

    <Button Click="someButton_Click">
        <Button.Content>
            <StackPanel Name="someContent" Visibility="Hidden">
                <TextBlock Text="Button Content"/>
            </StackPanel>
        </Button.Content>
    </Button>
    

    And the processor of the event:

    private void someButton_Click(object sender, RoutedEventArgs e)
    {
        someContent.Visibility = Visibility.Visible;
    }
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2