Launching WPF Window from F# interactive, keyboard

2019-04-02 06:20发布

问题:

A GUI was developed in WPF, and when launching it as a standalone application, all editable fields (datagrid columns, textboxes, etc.) work fine.

However, when instantiating the window from FSI, no individual key characters are registered when typing. The interesting thing is copy/paste and highlight + delete all work.

The window is being initialized like this:

public void ShowGui()
{
    guiWindow = new MainWindow(Bench, this);
    guiWindow.Show();
    guiWindow.Activate();     
}

this function is then being invoked in FSI

All other functionality seems to work (button clicks, switching tabs), but any element that takes key input will not register the typed characters.

标签: c# wpf f# fsi