├── Examples └── Counter │ ├── Counter.IOS │ ├── Assets.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Main.fs │ ├── Entitlements.plist │ ├── packages.config │ ├── AppDelegate.fs │ ├── ViewController.fs │ ├── Info.plist │ ├── LaunchScreen.storyboard │ ├── Counter.IOS.fsproj │ └── Main.storyboard │ ├── Counter.Mac │ ├── Assets.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── AppIcon-16.png │ │ │ ├── AppIcon-32.png │ │ │ ├── AppIcon-128.png │ │ │ ├── AppIcon-256.png │ │ │ ├── AppIcon-512.png │ │ │ ├── AppIcon-128@2x.png │ │ │ ├── AppIcon-16@2x.png │ │ │ ├── AppIcon-256@2x.png │ │ │ ├── AppIcon-32@2x.png │ │ │ ├── AppIcon-512@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.fs │ ├── Main.fs │ ├── Entitlements.plist │ ├── packages.config │ ├── Info.plist │ ├── ViewController.fs │ ├── Counter.Mac.fsproj │ └── Main.storyboard │ ├── Counter.Droid │ ├── Resources │ │ ├── mipmap-hdpi │ │ │ └── Icon.png │ │ ├── mipmap-mdpi │ │ │ └── Icon.png │ │ ├── mipmap-xhdpi │ │ │ └── Icon.png │ │ ├── mipmap-xxhdpi │ │ │ └── Icon.png │ │ ├── mipmap-xxxhdpi │ │ │ └── Icon.png │ │ ├── values │ │ │ └── Strings.xml │ │ ├── layout │ │ │ └── Main.axml │ │ ├── AboutResources.txt │ │ └── Resource.designer.cs │ ├── packages.config │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.fs │ ├── Assets │ │ └── AboutAssets.txt │ ├── MainActivity.fs │ └── Counter.Droid.fsproj │ ├── Counter.WPF │ ├── App.config │ ├── Program.fs │ ├── packages.config │ ├── MainWindow.xaml.fs │ ├── MainWindow.xaml │ ├── AssemblyInfo.fs │ └── Counter.WPF.fsproj │ ├── Core │ ├── Core.fsproj │ └── MainComponent.fs │ └── Counter.sln ├── .travis.yml ├── .editorconfig ├── .gitignore ├── Tests ├── Tests.fsproj └── Tests.fs ├── Mu ├── Mu.fsproj └── Mu.fs ├── LICENSE ├── Mu.sln └── README.md /Examples/Counter/Counter.IOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/Counter/Counter.Droid/Resources/mipmap-hdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Droid/Resources/mipmap-hdpi/Icon.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Droid/Resources/mipmap-mdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Droid/Resources/mipmap-mdpi/Icon.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Droid/Resources/mipmap-xhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Droid/Resources/mipmap-xhdpi/Icon.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Droid/Resources/mipmap-xxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Droid/Resources/mipmap-xxhdpi/Icon.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Droid/Resources/mipmap-xxxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Droid/Resources/mipmap-xxxhdpi/Icon.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: csharp 2 | mono: none 3 | dotnet: 5.0 4 | install: 5 | - dotnet restore 6 | script: 7 | - dotnet build 8 | - dotnet test Tests/Tests.fsproj 9 | 10 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxa/Mu/HEAD/Examples/Counter/Counter.Mac/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /Examples/Counter/Counter.IOS/Main.fs: -------------------------------------------------------------------------------- 1 | namespace Counter.IOS 2 | 3 | open UIKit 4 | 5 | module Main = 6 | [] 7 | let main args = 8 | UIApplication.Main(args, null, "AppDelegate") 9 | 0 10 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/AppDelegate.fs: -------------------------------------------------------------------------------- 1 | namespace Counter.Mac 2 | 3 | open System 4 | open Foundation 5 | open AppKit 6 | 7 | [] 8 | type AppDelegate() = 9 | inherit NSApplicationDelegate() 10 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.Droid/Resources/values/Strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hello World, Click Me! 4 | Counter.Droid 5 | 6 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.WPF/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Main.fs: -------------------------------------------------------------------------------- 1 | namespace Counter.Mac 2 | 3 | open System 4 | open AppKit 5 | 6 | module main = 7 | [] 8 | let main args = 9 | NSApplication.Init() 10 | NSApplication.Main(args) 11 | 0 12 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.IOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.WPF/Program.fs: -------------------------------------------------------------------------------- 1 | open System 2 | open System.Windows 3 | open Counter.WPF 4 | 5 | [] 6 | [] 7 | let main argv = 8 | let mainWindow = new MainWindow() 9 | let application = new Application() 10 | application.Run mainWindow 11 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.IOS/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.Mac/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.IOS/AppDelegate.fs: -------------------------------------------------------------------------------- 1 | namespace Counter.IOS 2 | 3 | open System 4 | 5 | open UIKit 6 | open Foundation 7 | 8 | [] 9 | type AppDelegate() = 10 | inherit UIApplicationDelegate() 11 | 12 | override val Window = null with get, set 13 | 14 | override this.FinishedLaunching(app, options) = true 15 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.Droid/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.WPF/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.fs] 2 | indent_size=2 3 | max_line_length=96 4 | fsharp_max_if_then_else_short_width=96 5 | fsharp_max_infix_operator_expression=96 6 | fsharp_max_record_width=96 7 | fsharp_max_array_or_list_width=96 8 | fsharp_max_value_binding_width=96 9 | fsharp_max_function_binding_width=96 10 | fsharp_max_dot_get_expression_width=96 11 | fsharp_max_elmish_width=96 12 | fsharp_blank_lines_around_nested_multiline_expressions=false 13 | fsharp_multi_line_lambda_closing_newline=true 14 | fsharp_align_function_signature_to_indentation=true 15 | fsharp_alternative_long_member_definitions=true -------------------------------------------------------------------------------- /Examples/Counter/Core/Core.fsproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .ionide 2 | 3 | # Autosave files 4 | *~ 5 | 6 | # build 7 | [Oo]bj/ 8 | [Bb]in/ 9 | packages/ 10 | TestResults/ 11 | 12 | # globs 13 | Makefile.in 14 | *.DS_Store 15 | *.sln.cache 16 | *.suo 17 | *.cache 18 | *.pidb 19 | *.userprefs 20 | *.usertasks 21 | config.log 22 | config.make 23 | config.status 24 | aclocal.m4 25 | install-sh 26 | autom4te.cache/ 27 | *.user 28 | *.tar.gz 29 | tarballs/ 30 | test-results/ 31 | Thumbs.db 32 | .vs/ 33 | .vscode/ 34 | 35 | # Mac bundle stuff 36 | *.dmg 37 | *.app 38 | 39 | # resharper 40 | *_Resharper.* 41 | *.Resharper 42 | 43 | # dotCover 44 | *.dotCover 45 | 46 | *.nupkg 47 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.Droid/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.WPF/MainWindow.xaml.fs: -------------------------------------------------------------------------------- 1 | namespace Counter.WPF 2 | 3 | open FsXaml 4 | open Mu 5 | open Counter.Core 6 | open MainComponent 7 | 8 | type MainWindowBase = XAML<"MainWindow.xaml"> 9 | 10 | type MainWindow() as this = 11 | inherit MainWindowBase() 12 | do this.Loaded.Add(fun _ -> MainComponent.runInView this) 13 | 14 | interface IView with 15 | 16 | member x.BindModel model = 17 | <@ x.countLabel.Content <- sprintf "%d" model.Number 18 | x.randButton.Content <- model.ButtonTitle 19 | x.descTextBlock.Text <- model.Message @> 20 | 21 | member x.BindMsg send = 22 | x.incrButton.Click.Add(fun _ -> send Msg.Incr) 23 | x.decrButton.Click.Add(fun _ -> send Msg.Decr) 24 | x.randButton.Click.Add(fun _ -> send Msg.HandleRandomizing) 25 | -------------------------------------------------------------------------------- /Tests/Tests.fsproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | runtime; build; native; contentfiles; analyzers; buildtransitive 18 | all 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Examples/Counter/Counter.WPF/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 |