Skip to content

Instantly share code, notes, and snippets.

@halfAbee
halfAbee / gist:b020afc692a36f882adc5a733523e315
Created June 30, 2026 16:31
F# Avalonia no-XAML win32 interop File Picker
module Pick
// tested on dotnet 10, Avalonia 12.0.1
//
// source API docs, e.g.: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfonta
//
open System
open System.Runtime.InteropServices
open Avalonia
// Odin Error Challenge in F#
// see: https://rm4n0s.github.io/posts/3-error-handling-challenge/#odins-teachings-in-action
// try pasting the code into: https://sharplab.io/
type F1_Error =
| None
| Account_Is_Empty
| Investment_Lost
type F2_Error =