Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
<Button Name="Dog" Content="Dog" Height="80" FontSize="17" Width="{Binding RelativeSource={RelativeSource Self},Path=Height}" Click="Dog_Click"/>



When i click the button, the content "Dog" is got visible, otherwise it should hide.. so how to do???
Posted
Comments
BillWoodruff 21-Oct-15 6:01am    
Do what you need to do in the Click Event Handler.

Assign Content property of button on button click handler.
 
Share this answer
 
Based on my understanding, I've done this,
HTML
<Button Name="Dog" Content="" Height="80" FontSize="17" Width="{Binding RelativeSource={RelativeSource Self},Path=Height}" Click="Dog_Click"/>

C#
protected void Dog_Click(...)
{
    Dog.Content = "Dog";
}


-KR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900