问题
I'm 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 check the keyeventargs, etc.
I have tried setting the button's visibility to Collapsed or Hidden, which also makes the button unclickable, and therefore useless for my purposes.
Any more ideas?
回答1:
Try this :
<Button Opacity="0" />
回答2:
just make a button and set
button.Visibility = Visibility.Hidden;
or
button.Visibility = Visibility.Collapsed;
来源:https://stackoverflow.com/questions/14423947/how-can-i-create-a-completely-invisible-button