I am learning the State Design Pattern. I am using C# ASP.Net (not sure if the language is relevant).
Basically, my object has states A, B and C, and also actions to move it between different states: ActionAToB, ActionBtoA and ActionAtoC.
What I am trying to do is tie this object to a screen, and have buttons trigger these actions, but the issue is: How do I only show the buttons relevant to the state that object is in, and show/hide buttons when the state changes?
I am looking for an elegant solution that goes with the state pattern, or any suggestions that would make the UI easy to maintain.