Hello World WPF for F# on .NET Core 3.1
Last active
June 19, 2020 13:16
-
-
Save teyc/cb59c648b7b0c8de6a100ae77fd69263 to your computer and use it in GitHub Desktop.
F# Core and WPF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="clr-namespace:FsWpf" | |
StartupUri="MainWindow.xaml"> | |
<Application.Resources> | |
</Application.Resources> | |
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> | |
<PropertyGroup> | |
<OutputType>WinExe</OutputType> | |
<TargetFramework>netcoreapp3.1</TargetFramework> | |
<UseWPF>true</UseWPF> | |
<Language>F#</Language> | |
<UseStandardResourceNames>true</UseStandardResourceNames> | |
</PropertyGroup> | |
<ItemGroup> | |
<Compile Include="Program.fs" /> | |
<Page Remove="*.xaml" /> | |
<Resource Include="*.xaml" /> | |
</ItemGroup> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:local="clr-namespace:FsWpf" | |
mc:Ignorable="d" | |
Title="MainWindow" Height="450" Width="800"> | |
<Grid> | |
<TextBlock>Hello World</TextBlock> | |
</Grid> | |
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.Windows | |
[<STAThread>] | |
[<EntryPoint>] | |
let main _ = | |
let application = Application.LoadComponent (Uri("App.xaml", UriKind.Relative)) :?> Application | |
application.Run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment