I have been googling this question, but so far nothing found.
Is there some function, that enables me to remove or hide an button (in wpf)?
For example:
A form with 2 buttons on it:
- On initialize, only button 1 will be visible
- Click button1, this will make button2 visible
- Click button2, this will make button1 get removed (or hidden).
Is such a thing possible in c# in WPF?
It is possible and very easy to do, just use the buttons click event handlers to toggle the other buttons
visibilityproperty.And one more important thing you have to give a name to your buttons so you can use them from code behind.
MSDN Visibility Property