Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在F#FSI的WPF文本框中输入文本_Wpf_F# - Fatal编程技术网

无法在F#FSI的WPF文本框中输入文本

无法在F#FSI的WPF文本框中输入文本,wpf,f#,Wpf,F#,在下面的F#WPF代码中,当我从F#FSI“显示”WPF窗口时,我无法在文本框中输入任何文本。这与正在使用的Windows窗体事件循环有关吗 let txtBox = new TextBox() txtBox.BorderThickness <- Thickness(2.) txtBox.Margin <- Thickness(7.) txtBox.IsReadOnly <- false let wnd = new Window(Title = "Test", Height

在下面的F#WPF代码中,当我从F#FSI“显示”WPF窗口时,我无法在文本框中输入任何文本。这与正在使用的Windows窗体事件循环有关吗

let txtBox = new TextBox()
txtBox.BorderThickness <- Thickness(2.)
txtBox.Margin <- Thickness(7.)
txtBox.IsReadOnly <- false

let wnd = new Window(Title = "Test", Height = 500., Width = 500.)
wnd.Content <- txtBox
wnd.Show()
让txtBox=newtextbox()

txtBox.BorderThickness您需要调用
应用程序。运行
-请参阅。这将自动为您启动事件循环

let txtBox = new TextBox()
txtBox.BorderThickness <- Thickness(2.)
txtBox.Margin <- Thickness(7.)
txtBox.IsReadOnly <- false

let wnd = new Window(Title = "Test", Height = 500., Width = 500.)
wnd.Content <- txtBox

(new Application()).Run(wnd) |> ignore