Caliburn Micro Binding KeyDown Event

<TextBox x:Name="MyTextBox" TextAlignment="Left" FontSize="10" Width="240" cal:Message.Attach="[Event KeyUp]=[Action ExecuteAction($executionContext)]"/>
public void ExecuteAction(ActionExecutionContext context)
    {
        var eventArgs = (KeyEventArgs)context.EventArgs;
        if (eventArgs.Key != Key.Enter) return; 
        //Execute Actions...
    }
原文地址:https://www.cnblogs.com/thinkaspx/p/3505597.html