Unfortunately, there is nothing out of the box that does this. What you
are looking for is the command pattern, where you have objects which
represent actions, and triggering an action where the state of the command
is updated will be reflected in all UI elements which are bound to the
command.
You are going to have to implement something like this in .NET yourself,
or, if you are fortunate enough, develop in WPF, as it has a very rich
command infrastructure.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"supermonkey" <su*********@mail.nankai.edu.cnwrote in message
news:e0**************@TK2MSFTNGP04.phx.gbl...
As we all known, a menuItem often has a corresponding toolbar button in a
windows form program.
I want to associate a menuItem with corresponding toobarbutton which has
the same action with it. So that when I check a menuItem, the
toolbarbutton will also looks like "pressed".
In MFC, we call achieve this purpose by seting them to the same ID, but
how to implement this in C#??
Thank you very much!