我使用F#和XAML来创建图形用户界面,但不幸的是,在为xaml创建类型之后,我没有可用的run方法。这里我漏掉了什么?
代码:
module Program
open FsXaml
open System
type App = XAML<"App.xaml">
[<STAThread>]
[<EntryPoint>]
let main argv =
let app = App()
app.Run()发布于 2018-07-27 18:50:07
App.xaml应包含应用程序,而不是窗口:
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application> 这将提供一个Run方法。确保您添加了一个xaml文件"MainWindow.xaml“,其中定义了一个窗口。
https://stackoverflow.com/questions/51554932
复制相似问题