Launching WPF Window from F# interactive, keyboard

2019-04-02 05:49发布

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
0条回答
登录 后发表回答