Getting this weird issue, not sure if it's just me, and I don't remember this happening before...
#r "PresentationFramework"
#r "PresentationCore"
#r "WindowsBase"
System.Windows.Window(
Content = System.Windows.Controls.TextBox())
.Show()
The window shows up, the TextBox
shows up, but I can't enter any alphanumeric text unless I paste them in, only spaces. Same deal with RichTextBox
.
On the other hand, it works just fine with ShowDialog()
, which led me to suspect it might have something to do with the event pump, so I replaced fsi.EventLoop with a WPF one -- but that one won't even call Run()
for whatever reason.
Edit: The "answer" on the other question uses Application.Run()
, which is effectively the same thing as using ShowDialog()
in that both are blocking calls. However, this decimates the utility of calling WPF from FSI. My question is specifically on using the TextBox controls without making a blocking call to show the window.