f# - WPF window will not open after adding namespace -
f# - WPF window will not open after adding namespace -
so have simple f# wpf application. working fine without declaring namespace , using multiple modules.
now, still compiles, nothing. nil in debug show either.
this current code not work.
namespace flow module mainapp = open scheme open system.windows allow app1 = new application() [<stathread>] app1.run(new main.mainwindow()) |>ignore
before worked when this
module mainapp open scheme open system.windows allow app1 = new application() [<stathread>] app1.run(new main.mainwindow()) |>ignore
i can show definition of mainwindow, long, class inherits window. allow me know if help. or if there other info give help issue.
your original code relies on implicit entry point:
"when programme has no entrypoint attribute explicitly indicates entry point, top level bindings in lastly file compiled used entry point."
you can either define function in module , explicitly mark entry point:
namespace flow module mainapp = open scheme open system.windows allow app1 = new application() [<entrypoint>] [<stathread>] allow main args = app1.run(new window())
or can go on utilize implicit entry point including namespace in module name:
module flow.mainapp open scheme open system.windows allow app1 = new application() [<stathread>] app1.run(new window()) |>ignore
wpf f#
Comments
Post a Comment