I have a window that works as a Visual Studio designer. Each document has two types:
- View source
- View constructor.
I have a toolbar that can issue different commands. The toolbar button has a CommandId line property that stores the command identifier, for example:
- Cut, copy, paste;
- Paste grid,
- Auto format
- ...
I had a problem creating a command template where the execution of the command differs depending on the view.
For an obvious example, the copy command will copy the selected text in the Source window, but copy the selected control in the Design view.
commandId CopyCommand, , , .
, (, , CopyCommand, SourceCopyCommand DesignCopyCommand, )?
, , ?