Click here to Skip to main content
15,312,009 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new in WPF and I have created application in which i want to handle visibility property of Button with triggers.
I have created trigger inside my inline style of Button and when "IsMouseOver" property is true, I keep visibility of button hidden.
But when i run application and run my curser over button, its visibility "Hidden" doesn't stay constant it fluctuate every time i run my curser over button.
Please need help.
Thank you in advance :)
Posted

1 solution

Think about what happens:
  1. You move the mouse over the button;
  2. IsMouseOver is true, so your trigger hides the button;
  3. The button is hidden, so the mouse cannot be over the button. The trigger shows the button again;
  4. IsMouseOver is true, so your trigger hides the button;
  5. ...

You could try setting the button's Opacity to 0 instead of hiding it.

However, this sounds like an extremely annoying and unusable UI design.
   
Comments
Priyank6125 28-Sep-15 1:00am
   
Thanks Richard...for helping :)

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