Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What I want to achieve is this:
I want one of the rows of my xaml code to be hidden in general, and make a hyperlink or some sort of blue linked text in the row below this one. So that when pressed on this hyperlink, it should make visible the contents of the hidden row; if clicked again, it should plus those same contents again of the row that was set to be hidden. Hope you got my point. I want this hyperlink to work in this fashion that, whenever it is clicked, it should make a copy of the hidden code and execute above it. Please help me with this issue, I need to achieve this. Thank you.

(P.S. The hyperlink should be hyperlink, or if button, it should at least look like a hyperlink i.e. blue colored text)

What I have tried:




<wrappanel orientation="Vertical" grid.row="7" grid.column="1" margin="0,10,0,10">

<accesstext textdecorations="Underline" text="Add modifier group" foreground="Blue">
Posted
Updated 30-Sep-20 11:04am

1 solution

Add your hide / show code to the click event handler.

XML
<TextBlock>
   <TextBlock.Inlines>
      <Hyperlink x:Name="uxLink"
                 Click="uxLink_Click">
         Link text
      </Hyperlink>
   </TextBlock.Inlines>
</TextBlock>
 
Share this answer
 
Comments
Haseeb47 3-Oct-20 8:21am    
I appreciate your answer dear, but, thing is that I'm a kind of a novice to WPF. Could you please explain a bit more that how or where to put the code that i want to hide (with an example would be great). Thank you :)

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