
I am new to Silverlight, Actipro, and novice at MVVM.
I am trying to use the <shared:ToolBar /> and the <editor:SyntaxEditor />.I'd like to replace the ??? to either some Actipro static ICommand (EditorCommands?), or to my ViewModels command.
In addition, depending on what is currently being edited, I'd like the commands to reflect the changes in Enabled state (i.e. maybe the current document doesn't support RequestIntelliPromptQuickInfoSession), but if I switch to one that does, I'd like to see the button Enabled state changed (I figure that ICommand.CanExecuteChanged would need to be raised).
I tried looking at EditorCommands, and also creating a Wrapper<T> : where T : IEditAction, but I can't get them to work. I figure that there has to be someway, because I can hit the hot-keys and it auto-magically works (I assume it calls UndoAction.Execute when I hit Ctrl-Z).
Ideally, I would have little to no code in the View codebehind, but if that is cleaner, with the appropriate level of Seperation of Concerns, then I'd be happy.
Thanks
I am trying to use the <shared:ToolBar /> and the <editor:SyntaxEditor />.
<shared:ToolBar ..>
<Button Command="{Binding ???}" />
</shared:ToolBar>
In addition, depending on what is currently being edited, I'd like the commands to reflect the changes in Enabled state (i.e. maybe the current document doesn't support RequestIntelliPromptQuickInfoSession), but if I switch to one that does, I'd like to see the button Enabled state changed (I figure that ICommand.CanExecuteChanged would need to be raised).
I tried looking at EditorCommands, and also creating a Wrapper<T> : where T : IEditAction, but I can't get them to work. I figure that there has to be someway, because I can hit the hot-keys and it auto-magically works (I assume it calls UndoAction.Execute when I hit Ctrl-Z).
Ideally, I would have little to no code in the View codebehind, but if that is cleaner, with the appropriate level of Seperation of Concerns, then I'd be happy.
Thanks