I created a project and added a new class. Then I made it Public Class( ICommand ). In the past, I’m pretty sure I just right clicked on the ICommand and there was a choice to “Implement Interface Members” which filled out stubs for that interface. It didn’t do it this time. Did that get taken away or am I not doing something right? That feature was a great timesaver as it made all the right parameters, types, etc.
… moments pass …
I just noticed that if I hovered over the ICommand, it says “unknown type ICommand”. It compiles, so I would think it was known. Here is what I have after completing the interface members manually:
namespace InsteonViewmodels.Commands; interface uses Insteon.Viewmodels, System.Windows.Input, System.Windows; type DeleteSelectedSceneDevicesCommand = public class( ICommand ) private fViewmodel : InsteonViewmodel; protected public constructor Create( viewmodel : InsteonViewmodel ); function CanExecute( parameter : Object ) : Boolean; procedure Execute( parameter : Object ); event CanExecuteChanged : EventHandler; end; implementation constructor DeleteSelectedSceneDevicesCommand( viewmodel: InsteonViewmodel ); begin fViewmodel := viewmodel; end; method DeleteSelectedSceneDevicesCommand.CanExecute(parameter: object): Boolean; begin result := true; end; method DeleteSelectedSceneDevicesCommand.Execute( parameter : Object ); begin fViewmodel.DeleteSelectedSceneDevices; end; end.