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 Avalonia.Controls | |
open Avalonia.Layout | |
type MainWindow () as self = | |
inherit Window () | |
let txb = TextBlock(Text = "F# Avalonia app", | |
HorizontalAlignment = HorizontalAlignment.Center, | |
VerticalAlignment = VerticalAlignment.Center) | |
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
type Data = | |
{ C : int[] | |
P : float[] | |
Values : int [][] } | |
module Tuple = | |
let mapPair f (x,y) = x |> f, y |> f | |
let swap (x,y) = y, x | |
let pairToArray (x,y) = [|x ; y |] |
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
module Context = | |
open Gjallarhorn | |
open Gjallarhorn.Bindable | |
let rand = Random() | |
let choose n = | |
Array.sortBy (fun _ -> rand.Next()) [|0..10|] | |
let create () = |
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:fsxaml="http://github.com/fsprojects/FsXaml" | |
Title="MVVM and XAML Type provider" | |
Width="400" | |
Height="200"> | |
<Grid> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> |