How do I create a completely invisible button?

I am trying to create a WPF button that is completely invisible but still has an onclick or click event, without resorting to something like MouseDown and not checking keyeventargs etc.

I tried to set the visibility of the button to "Minimized" or "Hidden", which also makes the button invisible and therefore useless for my purposes.

Any ideas?

+2


source to share


2 answers


Try the following:



<Button Opacity="0" />

      

+9


source


just run the button and install

  button.Visibility = Visibility.Hidden;

      



or

  button.Visibility = Visibility.Collapsed;

      

+2


source







All Articles