How to create UI that Changes One Button to Another and Code Button in Visual Studio C#?

UserGnyfm 21 Reputation points
2022-07-13T04:06:49.637+00:00

How to create UI that Changes One Button to Another and Code Button in Visual Studio C#?

Add button --> Save Button
Edit --> Cancel Button
then brings back to its original Add and Edit button when Cancel button is clicked.
220235-1.png220245-2.png

Developer technologies C#
0 comments No comments
{count} votes

Accepted answer
  1. Dillon Silzer 57,826 Reputation points Volunteer Moderator
    2022-07-13T04:41:34.777+00:00

    You could try the following:

    • On load: saveButton.visible = false; cancelButton.visible = false;
    • On Add Button Click: addButton.visible = false; editButton.visible = false; saveButton.visible = true; cancelButton.visible = true;
    • On Cancel Button Click: addButton.visible = true; editButton.visible = true; saveButton.visible = false; cancelButton.visible = false;
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.