Pong

Pong video game runnable inside TryFSharp.org. Player 1 keys 'Q' - up, 'A' - down. Player 2 keys 'P' - up, 'L' - down.

Copy Source
Copy Link
Tools:
 1: Skip module definition on TryFSharp.org
 2: 
 3: open System
 4: open System.Windows
 5: open System.Windows.Controls
 6: open System.Windows.Input
 7: open System.Windows.Media
 8: open System.Windows.Shapes
 9: 
10: let width,height = 512,384
11: let move(shape,x,y) = Canvas.SetLeft(shape,float x); Canvas.SetTop(shape,float y)
12: let read(shape) = Canvas.GetLeft(shape) |> int, Canvas.GetTop(shape) |> int
13: let rectangle(x,y,w,h) =
14:     let shape= Rectangle(Width=float w,Height=float h,Fill=SolidColorBrush Colors.White)
15:     move(shape,x,y)
16:     shape
17: let run rate update =
18:     let rate = TimeSpan.FromSeconds(rate)
19:     let lastUpdate = ref DateTime.Now
20:     let residual = ref (TimeSpan())
21:     CompositionTarget.Rendering.Add (fun _ -> 
22:         let now = DateTime.Now
23:         residual := !residual + (now - !lastUpdate)
24:         while !residual > rate do
25:             update(); residual := !residual - rate
26:         lastUpdate := now
27:     )
28: 
29: type KeyState (control:Control) =
30:     let mutable keysDown = Set.empty  
31:     do  control.KeyDown.Add (fun e -> keysDown <- keysDown.Add e.Key)
32:     do  control.KeyUp.Add (fun e -> keysDown <- keysDown.Remove e.Key)        
33:     member this.IsKeyDown key = keysDown.Contains key
34: 
35: type Pad(keys:KeyState,up,down,x,y) =
36:     let shape = rectangle(x,y,10,60)
37:     let y = ref y
38:     member pad.Shape = shape
39:     member pad.Update () =
40:         if keys.IsKeyDown up then y := !y - 4
41:         if keys.IsKeyDown down then y := !y + 4
42:         move(shape,x,!y)
43: 
44: type Ball(blocks:Rectangle list) =
45:     let bx, by, bdx, bdy = ref (width/2), ref (height/4), ref 1, ref 1
46:     let shape = rectangle(!bx,!by,10,10)
47:     member ball.Shape = shape
48:     member ball.Update() =
49:         bx := !bx + !bdx*2
50:         by := !by + !bdy*2
51:         move(shape,!bx,!by)                       
52:         for block in blocks do
53:             let x,y = read block
54:             let w,h = int block.Width, int block.Height
55:             if !bx >= x && !bx < x + w && !by >= y && !by < y + h then
56:                 if w > h then bdy := - !bdy else bdx := - !bdx 
57:                 by := !by + !bdy*2; bx := !bx + !bdx*2
58: 
59: type GameControl() as control=
60:     inherit UserControl(Width=float width, Height=float height, IsTabStop=true)
61:     let keys = KeyState(control)
62:     let canvas = new Canvas(Background = SolidColorBrush Colors.Black)
63:     let top, bottom = rectangle(0,10,width,10), rectangle(0,height-20,width,10)
64:     let pad1, pad2 = Pad(keys,Key.Q,Key.A,10,60), Pad(keys,Key.P,Key.L,width-20,120)
65:     let ball = Ball([top;bottom;pad1.Shape;pad2.Shape])
66:     let (+.) (container:Panel) item = container.Children.Add item; container
67:     do  base.Content <- canvas+.top+.bottom+.pad1.Shape+.pad2.Shape+.ball.Shape
68:     let update () = pad1.Update(); pad2.Update(); ball.Update()
69:     do  async { 
70:         do! control.MouseLeftButtonDown |> Async.AwaitEvent |> Async.Ignore
71:         run (1.0/50.0) update 
72:         } |> Async.StartImmediate
73: 
74: Run script on TryFSharp.org
#if INTERACTIVE
#else
module Play
#endif
namespace System
namespace System.Windows
namespace System.Windows.Controls
namespace System.Windows.Input
namespace System.Windows.Media
namespace System.Windows.Shapes
val width : int

Full name: Snippet.width

  type: int
  implements: IComparable
  implements: IFormattable
  implements: IConvertible
  implements: IComparable<int>
  implements: IEquatable<int>
  inherits: ValueType
val height : int

Full name: Snippet.height

  type: int
  implements: IComparable
  implements: IFormattable
  implements: IConvertible
  implements: IComparable<int>
  implements: IEquatable<int>
  inherits: ValueType
val move : UIElement * int * int -> unit

Full name: Snippet.move
val shape : UIElement

  type: UIElement
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IInputElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
val x : int

  type: int
  implements: IComparable
  implements: IFormattable
  implements: IConvertible
  implements: IComparable<int>
  implements: IEquatable<int>
  inherits: ValueType
val y : int

  type: int
  implements: IComparable
  implements: IFormattable
  implements: IConvertible
  implements: IComparable<int>
  implements: IEquatable<int>
  inherits: ValueType
type Canvas =
  class
    inherit System.Windows.Controls.Panel
    new : unit -> System.Windows.Controls.Canvas
    static val LeftProperty : System.Windows.DependencyProperty
    static val TopProperty : System.Windows.DependencyProperty
    static val RightProperty : System.Windows.DependencyProperty
    static val BottomProperty : System.Windows.DependencyProperty
    static member GetBottom : System.Windows.UIElement -> float
    static member GetLeft : System.Windows.UIElement -> float
    static member GetRight : System.Windows.UIElement -> float
    static member GetTop : System.Windows.UIElement -> float
    static member SetBottom : System.Windows.UIElement * float -> unit
    static member SetLeft : System.Windows.UIElement * float -> unit
    static member SetRight : System.Windows.UIElement * float -> unit
    static member SetTop : System.Windows.UIElement * float -> unit
  end

Full name: System.Windows.Controls.Canvas

  type: Canvas
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  implements: Markup.IAddChild
  inherits: Panel
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
Canvas.SetLeft(element: UIElement, length: float) : unit
Multiple items
val float : 'T -> float (requires member op_Explicit)

Full name: Microsoft.FSharp.Core.Operators.float

--------------------

type float<'Measure> = float

Full name: Microsoft.FSharp.Core.float<_>

  type: float<'Measure>
  implements: IComparable
  implements: IConvertible
  implements: IFormattable
  implements: IComparable<float<'Measure>>
  implements: IEquatable<float<'Measure>>
  inherits: ValueType


--------------------

type float = Double

Full name: Microsoft.FSharp.Core.float

  type: float
  implements: IComparable
  implements: IFormattable
  implements: IConvertible
  implements: IComparable<float>
  implements: IEquatable<float>
  inherits: ValueType
Canvas.SetTop(element: UIElement, length: float) : unit
val read : UIElement -> int * int

Full name: Snippet.read
Canvas.GetLeft(element: UIElement) : float
Multiple items
val int : 'T -> int (requires member op_Explicit)

Full name: Microsoft.FSharp.Core.Operators.int

--------------------

type int<'Measure> = int

Full name: Microsoft.FSharp.Core.int<_>

  type: int<'Measure>
  implements: IComparable
  implements: IConvertible
  implements: IFormattable
  implements: IComparable<int<'Measure>>
  implements: IEquatable<int<'Measure>>
  inherits: ValueType


--------------------

type int = int32

Full name: Microsoft.FSharp.Core.int

  type: int
  implements: IComparable
  implements: IFormattable
  implements: IConvertible
  implements: IComparable<int>
  implements: IEquatable<int>
  inherits: ValueType
Canvas.GetTop(element: UIElement) : float
val rectangle : int * int * int * int -> Rectangle

Full name: Snippet.rectangle
val w : int

  type: int
  implements: IComparable
  implements: IFormattable
  implements: IConvertible
  implements: IComparable<int>
  implements: IEquatable<int>
  inherits: ValueType
val h : int

  type: int
  implements: IComparable
  implements: IFormattable
  implements: IConvertible
  implements: IComparable<int>
  implements: IEquatable<int>
  inherits: ValueType
val shape : Rectangle

  type: Rectangle
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  inherits: Shape
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
type Rectangle =
  class
    inherit System.Windows.Shapes.Shape
    new : unit -> System.Windows.Shapes.Rectangle
    member GeometryTransform : System.Windows.Media.Transform
    member RadiusX : float with get, set
    member RadiusY : float with get, set
    member RenderedGeometry : System.Windows.Media.Geometry
    static val RadiusXProperty : System.Windows.DependencyProperty
    static val RadiusYProperty : System.Windows.DependencyProperty
  end

Full name: System.Windows.Shapes.Rectangle

  type: Rectangle
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  inherits: Shape
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
type SolidColorBrush =
  class
    inherit System.Windows.Media.Brush
    new : unit -> System.Windows.Media.SolidColorBrush
    new : System.Windows.Media.Color -> System.Windows.Media.SolidColorBrush
    member Clone : unit -> System.Windows.Media.SolidColorBrush
    member CloneCurrentValue : unit -> System.Windows.Media.SolidColorBrush
    member Color : System.Windows.Media.Color with get, set
    static val ColorProperty : System.Windows.DependencyProperty
    static member DeserializeFrom : System.IO.BinaryReader -> obj
  end

Full name: System.Windows.Media.SolidColorBrush

  type: SolidColorBrush
  implements: ISealable
  implements: Animation.IAnimatable
  implements: IFormattable
  implements: Composition.DUCE.IResource
  inherits: Brush
  inherits: Animation.Animatable
  inherits: Freezable
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
type Colors =
  class
    static member AliceBlue : System.Windows.Media.Color
    static member AntiqueWhite : System.Windows.Media.Color
    static member Aqua : System.Windows.Media.Color
    static member Aquamarine : System.Windows.Media.Color
    static member Azure : System.Windows.Media.Color
    static member Beige : System.Windows.Media.Color
    static member Bisque : System.Windows.Media.Color
    static member Black : System.Windows.Media.Color
    static member BlanchedAlmond : System.Windows.Media.Color
    static member Blue : System.Windows.Media.Color
    static member BlueViolet : System.Windows.Media.Color
    static member Brown : System.Windows.Media.Color
    static member BurlyWood : System.Windows.Media.Color
    static member CadetBlue : System.Windows.Media.Color
    static member Chartreuse : System.Windows.Media.Color
    static member Chocolate : System.Windows.Media.Color
    static member Coral : System.Windows.Media.Color
    static member CornflowerBlue : System.Windows.Media.Color
    static member Cornsilk : System.Windows.Media.Color
    static member Crimson : System.Windows.Media.Color
    static member Cyan : System.Windows.Media.Color
    static member DarkBlue : System.Windows.Media.Color
    static member DarkCyan : System.Windows.Media.Color
    static member DarkGoldenrod : System.Windows.Media.Color
    static member DarkGray : System.Windows.Media.Color
    static member DarkGreen : System.Windows.Media.Color
    static member DarkKhaki : System.Windows.Media.Color
    static member DarkMagenta : System.Windows.Media.Color
    static member DarkOliveGreen : System.Windows.Media.Color
    static member DarkOrange : System.Windows.Media.Color
    static member DarkOrchid : System.Windows.Media.Color
    static member DarkRed : System.Windows.Media.Color
    static member DarkSalmon : System.Windows.Media.Color
    static member DarkSeaGreen : System.Windows.Media.Color
    static member DarkSlateBlue : System.Windows.Media.Color
    static member DarkSlateGray : System.Windows.Media.Color
    static member DarkTurquoise : System.Windows.Media.Color
    static member DarkViolet : System.Windows.Media.Color
    static member DeepPink : System.Windows.Media.Color
    static member DeepSkyBlue : System.Windows.Media.Color
    static member DimGray : System.Windows.Media.Color
    static member DodgerBlue : System.Windows.Media.Color
    static member Firebrick : System.Windows.Media.Color
    static member FloralWhite : System.Windows.Media.Color
    static member ForestGreen : System.Windows.Media.Color
    static member Fuchsia : System.Windows.Media.Color
    static member Gainsboro : System.Windows.Media.Color
    static member GhostWhite : System.Windows.Media.Color
    static member Gold : System.Windows.Media.Color
    static member Goldenrod : System.Windows.Media.Color
    static member Gray : System.Windows.Media.Color
    static member Green : System.Windows.Media.Color
    static member GreenYellow : System.Windows.Media.Color
    static member Honeydew : System.Windows.Media.Color
    static member HotPink : System.Windows.Media.Color
    static member IndianRed : System.Windows.Media.Color
    static member Indigo : System.Windows.Media.Color
    static member Ivory : System.Windows.Media.Color
    static member Khaki : System.Windows.Media.Color
    static member Lavender : System.Windows.Media.Color
    static member LavenderBlush : System.Windows.Media.Color
    static member LawnGreen : System.Windows.Media.Color
    static member LemonChiffon : System.Windows.Media.Color
    static member LightBlue : System.Windows.Media.Color
    static member LightCoral : System.Windows.Media.Color
    static member LightCyan : System.Windows.Media.Color
    static member LightGoldenrodYellow : System.Windows.Media.Color
    static member LightGray : System.Windows.Media.Color
    static member LightGreen : System.Windows.Media.Color
    static member LightPink : System.Windows.Media.Color
    static member LightSalmon : System.Windows.Media.Color
    static member LightSeaGreen : System.Windows.Media.Color
    static member LightSkyBlue : System.Windows.Media.Color
    static member LightSlateGray : System.Windows.Media.Color
    static member LightSteelBlue : System.Windows.Media.Color
    static member LightYellow : System.Windows.Media.Color
    static member Lime : System.Windows.Media.Color
    static member LimeGreen : System.Windows.Media.Color
    static member Linen : System.Windows.Media.Color
    static member Magenta : System.Windows.Media.Color
    static member Maroon : System.Windows.Media.Color
    static member MediumAquamarine : System.Windows.Media.Color
    static member MediumBlue : System.Windows.Media.Color
    static member MediumOrchid : System.Windows.Media.Color
    static member MediumPurple : System.Windows.Media.Color
    static member MediumSeaGreen : System.Windows.Media.Color
    static member MediumSlateBlue : System.Windows.Media.Color
    static member MediumSpringGreen : System.Windows.Media.Color
    static member MediumTurquoise : System.Windows.Media.Color
    static member MediumVioletRed : System.Windows.Media.Color
    static member MidnightBlue : System.Windows.Media.Color
    static member MintCream : System.Windows.Media.Color
    static member MistyRose : System.Windows.Media.Color
    static member Moccasin : System.Windows.Media.Color
    static member NavajoWhite : System.Windows.Media.Color
    static member Navy : System.Windows.Media.Color
    static member OldLace : System.Windows.Media.Color
    static member Olive : System.Windows.Media.Color
    static member OliveDrab : System.Windows.Media.Color
    static member Orange : System.Windows.Media.Color
    static member OrangeRed : System.Windows.Media.Color
    static member Orchid : System.Windows.Media.Color
    static member PaleGoldenrod : System.Windows.Media.Color
    static member PaleGreen : System.Windows.Media.Color
    static member PaleTurquoise : System.Windows.Media.Color
    static member PaleVioletRed : System.Windows.Media.Color
    static member PapayaWhip : System.Windows.Media.Color
    static member PeachPuff : System.Windows.Media.Color
    static member Peru : System.Windows.Media.Color
    static member Pink : System.Windows.Media.Color
    static member Plum : System.Windows.Media.Color
    static member PowderBlue : System.Windows.Media.Color
    static member Purple : System.Windows.Media.Color
    static member Red : System.Windows.Media.Color
    static member RosyBrown : System.Windows.Media.Color
    static member RoyalBlue : System.Windows.Media.Color
    static member SaddleBrown : System.Windows.Media.Color
    static member Salmon : System.Windows.Media.Color
    static member SandyBrown : System.Windows.Media.Color
    static member SeaGreen : System.Windows.Media.Color
    static member SeaShell : System.Windows.Media.Color
    static member Sienna : System.Windows.Media.Color
    static member Silver : System.Windows.Media.Color
    static member SkyBlue : System.Windows.Media.Color
    static member SlateBlue : System.Windows.Media.Color
    static member SlateGray : System.Windows.Media.Color
    static member Snow : System.Windows.Media.Color
    static member SpringGreen : System.Windows.Media.Color
    static member SteelBlue : System.Windows.Media.Color
    static member Tan : System.Windows.Media.Color
    static member Teal : System.Windows.Media.Color
    static member Thistle : System.Windows.Media.Color
    static member Tomato : System.Windows.Media.Color
    static member Transparent : System.Windows.Media.Color
    static member Turquoise : System.Windows.Media.Color
    static member Violet : System.Windows.Media.Color
    static member Wheat : System.Windows.Media.Color
    static member White : System.Windows.Media.Color
    static member WhiteSmoke : System.Windows.Media.Color
    static member Yellow : System.Windows.Media.Color
    static member YellowGreen : System.Windows.Media.Color
  end

Full name: System.Windows.Media.Colors
property Colors.White: Color
val run : float -> (unit -> unit) -> unit

Full name: Snippet.run
val rate : float

  type: float
  implements: IComparable
  implements: IFormattable
  implements: IConvertible
  implements: IComparable<float>
  implements: IEquatable<float>
  inherits: ValueType
val update : (unit -> unit)
val rate : TimeSpan

  type: TimeSpan
  implements: IComparable
  implements: IComparable<TimeSpan>
  implements: IEquatable<TimeSpan>
  implements: IFormattable
  inherits: ValueType
type TimeSpan =
  struct
    new : int64 -> System.TimeSpan
    new : int * int * int -> System.TimeSpan
    new : int * int * int * int -> System.TimeSpan
    new : int * int * int * int * int -> System.TimeSpan
    member Add : System.TimeSpan -> System.TimeSpan
    member CompareTo : obj -> int
    member CompareTo : System.TimeSpan -> int
    member Days : int
    member Duration : unit -> System.TimeSpan
    member Equals : obj -> bool
    member Equals : System.TimeSpan -> bool
    member GetHashCode : unit -> int
    member Hours : int
    member Milliseconds : int
    member Minutes : int
    member Negate : unit -> System.TimeSpan
    member Seconds : int
    member Subtract : System.TimeSpan -> System.TimeSpan
    member Ticks : int64
    member ToString : unit -> string
    member ToString : string -> string
    member ToString : string * System.IFormatProvider -> string
    member TotalDays : float
    member TotalHours : float
    member TotalMilliseconds : float
    member TotalMinutes : float
    member TotalSeconds : float
    static val TicksPerMillisecond : int64
    static val TicksPerSecond : int64
    static val TicksPerMinute : int64
    static val TicksPerHour : int64
    static val TicksPerDay : int64
    static val Zero : System.TimeSpan
    static val MaxValue : System.TimeSpan
    static val MinValue : System.TimeSpan
    static member Compare : System.TimeSpan * System.TimeSpan -> int
    static member Equals : System.TimeSpan * System.TimeSpan -> bool
    static member FromDays : float -> System.TimeSpan
    static member FromHours : float -> System.TimeSpan
    static member FromMilliseconds : float -> System.TimeSpan
    static member FromMinutes : float -> System.TimeSpan
    static member FromSeconds : float -> System.TimeSpan
    static member FromTicks : int64 -> System.TimeSpan
    static member Parse : string -> System.TimeSpan
    static member Parse : string * System.IFormatProvider -> System.TimeSpan
    static member ParseExact : string * string * System.IFormatProvider -> System.TimeSpan
    static member ParseExact : string * string [] * System.IFormatProvider -> System.TimeSpan
    static member ParseExact : string * string * System.IFormatProvider * System.Globalization.TimeSpanStyles -> System.TimeSpan
    static member ParseExact : string * string [] * System.IFormatProvider * System.Globalization.TimeSpanStyles -> System.TimeSpan
    static member TryParse : string * System.TimeSpan -> bool
    static member TryParse : string * System.IFormatProvider * System.TimeSpan -> bool
    static member TryParseExact : string * string * System.IFormatProvider * System.TimeSpan -> bool
    static member TryParseExact : string * string [] * System.IFormatProvider * System.TimeSpan -> bool
    static member TryParseExact : string * string * System.IFormatProvider * System.Globalization.TimeSpanStyles * System.TimeSpan -> bool
    static member TryParseExact : string * string [] * System.IFormatProvider * System.Globalization.TimeSpanStyles * System.TimeSpan -> bool
  end

Full name: System.TimeSpan

  type: TimeSpan
  implements: IComparable
  implements: IComparable<TimeSpan>
  implements: IEquatable<TimeSpan>
  implements: IFormattable
  inherits: ValueType
TimeSpan.FromSeconds(value: float) : TimeSpan
val lastUpdate : DateTime ref

  type: DateTime ref
  implements: Collections.IStructuralEquatable
  implements: IComparable<Ref<DateTime>>
  implements: IComparable
  implements: Collections.IStructuralComparable
Multiple items
val ref : 'T -> 'T ref

Full name: Microsoft.FSharp.Core.Operators.ref

--------------------

type 'T ref = Ref<'T>

Full name: Microsoft.FSharp.Core.ref<_>

  type: 'T ref
  implements: Collections.IStructuralEquatable
  implements: IComparable<Ref<'T>>
  implements: IComparable
  implements: Collections.IStructuralComparable
type DateTime =
  struct
    new : int64 -> System.DateTime
    new : int64 * System.DateTimeKind -> System.DateTime
    new : int * int * int -> System.DateTime
    new : int * int * int * System.Globalization.Calendar -> System.DateTime
    new : int * int * int * int * int * int -> System.DateTime
    new : int * int * int * int * int * int * System.DateTimeKind -> System.DateTime
    new : int * int * int * int * int * int * System.Globalization.Calendar -> System.DateTime
    new : int * int * int * int * int * int * int -> System.DateTime
    new : int * int * int * int * int * int * int * System.DateTimeKind -> System.DateTime
    new : int * int * int * int * int * int * int * System.Globalization.Calendar -> System.DateTime
    new : int * int * int * int * int * int * int * System.Globalization.Calendar * System.DateTimeKind -> System.DateTime
    member Add : System.TimeSpan -> System.DateTime
    member AddDays : float -> System.DateTime
    member AddHours : float -> System.DateTime
    member AddMilliseconds : float -> System.DateTime
    member AddMinutes : float -> System.DateTime
    member AddMonths : int -> System.DateTime
    member AddSeconds : float -> System.DateTime
    member AddTicks : int64 -> System.DateTime
    member AddYears : int -> System.DateTime
    member CompareTo : obj -> int
    member CompareTo : System.DateTime -> int
    member Date : System.DateTime
    member Day : int
    member DayOfWeek : System.DayOfWeek
    member DayOfYear : int
    member Equals : obj -> bool
    member Equals : System.DateTime -> bool
    member GetDateTimeFormats : unit -> string []
    member GetDateTimeFormats : System.IFormatProvider -> string []
    member GetDateTimeFormats : char -> string []
    member GetDateTimeFormats : char * System.IFormatProvider -> string []
    member GetHashCode : unit -> int
    member GetTypeCode : unit -> System.TypeCode
    member Hour : int
    member IsDaylightSavingTime : unit -> bool
    member Kind : System.DateTimeKind
    member Millisecond : int
    member Minute : int
    member Month : int
    member Second : int
    member Subtract : System.DateTime -> System.TimeSpan
    member Subtract : System.TimeSpan -> System.DateTime
    member Ticks : int64
    member TimeOfDay : System.TimeSpan
    member ToBinary : unit -> int64
    member ToFileTime : unit -> int64
    member ToFileTimeUtc : unit -> int64
    member ToLocalTime : unit -> System.DateTime
    member ToLongDateString : unit -> string
    member ToLongTimeString : unit -> string
    member ToOADate : unit -> float
    member ToShortDateString : unit -> string
    member ToShortTimeString : unit -> string
    member ToString : unit -> string
    member ToString : string -> string
    member ToString : System.IFormatProvider -> string
    member ToString : string * System.IFormatProvider -> string
    member ToUniversalTime : unit -> System.DateTime
    member Year : int
    static val MinValue : System.DateTime
    static val MaxValue : System.DateTime
    static member Compare : System.DateTime * System.DateTime -> int
    static member DaysInMonth : int * int -> int
    static member Equals : System.DateTime * System.DateTime -> bool
    static member FromBinary : int64 -> System.DateTime
    static member FromFileTime : int64 -> System.DateTime
    static member FromFileTimeUtc : int64 -> System.DateTime
    static member FromOADate : float -> System.DateTime
    static member IsLeapYear : int -> bool
    static member Now : System.DateTime
    static member Parse : string -> System.DateTime
    static member Parse : string * System.IFormatProvider -> System.DateTime
    static member Parse : string * System.IFormatProvider * System.Globalization.DateTimeStyles -> System.DateTime
    static member ParseExact : string * string * System.IFormatProvider -> System.DateTime
    static member ParseExact : string * string * System.IFormatProvider * System.Globalization.DateTimeStyles -> System.DateTime
    static member ParseExact : string * string [] * System.IFormatProvider * System.Globalization.DateTimeStyles -> System.DateTime
    static member SpecifyKind : System.DateTime * System.DateTimeKind -> System.DateTime
    static member Today : System.DateTime
    static member TryParse : string * System.DateTime -> bool
    static member TryParse : string * System.IFormatProvider * System.Globalization.DateTimeStyles * System.DateTime -> bool
    static member TryParseExact : string * string * System.IFormatProvider * System.Globalization.DateTimeStyles * System.DateTime -> bool
    static member TryParseExact : string * string [] * System.IFormatProvider * System.Globalization.DateTimeStyles * System.DateTime -> bool
    static member UtcNow : System.DateTime
  end

Full name: System.DateTime

  type: DateTime
  implements: IComparable
  implements: IFormattable
  implements: IConvertible
  implements: Runtime.Serialization.ISerializable
  implements: IComparable<DateTime>
  implements: IEquatable<DateTime>
  inherits: ValueType
property DateTime.Now: DateTime
val residual : TimeSpan ref

  type: TimeSpan ref
  implements: Collections.IStructuralEquatable
  implements: IComparable<Ref<TimeSpan>>
  implements: IComparable
  implements: Collections.IStructuralComparable
type CompositionTarget =
  class
    inherit System.Windows.Threading.DispatcherObject
    member Dispose : unit -> unit
    member RootVisual : System.Windows.Media.Visual with get, set
    member TransformFromDevice : System.Windows.Media.Matrix
    member TransformToDevice : System.Windows.Media.Matrix
  end

Full name: System.Windows.Media.CompositionTarget

  type: CompositionTarget
  implements: ICompositionTarget
  implements: IDisposable
  inherits: Threading.DispatcherObject
event CompositionTarget.Rendering: IEvent<EventHandler,EventArgs>
member IObservable.Add : callback:('T -> unit) -> unit
val now : DateTime

  type: DateTime
  implements: IComparable
  implements: IFormattable
  implements: IConvertible
  implements: Runtime.Serialization.ISerializable
  implements: IComparable<DateTime>
  implements: IEquatable<DateTime>
  inherits: ValueType
type KeyState =
  class
    new : control:Control -> KeyState
    member IsKeyDown : key:Key -> bool
  end

Full name: Snippet.KeyState
val control : Control

  type: Control
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
type Control =
  class
    inherit System.Windows.FrameworkElement
    new : unit -> System.Windows.Controls.Control
    member Background : System.Windows.Media.Brush with get, set
    member BorderBrush : System.Windows.Media.Brush with get, set
    member BorderThickness : System.Windows.Thickness with get, set
    member FontFamily : System.Windows.Media.FontFamily with get, set
    member FontSize : float with get, set
    member FontStretch : System.Windows.FontStretch with get, set
    member FontStyle : System.Windows.FontStyle with get, set
    member FontWeight : System.Windows.FontWeight with get, set
    member Foreground : System.Windows.Media.Brush with get, set
    member HorizontalContentAlignment : System.Windows.HorizontalAlignment with get, set
    member IsTabStop : bool with get, set
    member Padding : System.Windows.Thickness with get, set
    member TabIndex : int with get, set
    member Template : System.Windows.Controls.ControlTemplate with get, set
    member ToString : unit -> string
    member VerticalContentAlignment : System.Windows.VerticalAlignment with get, set
    static val BorderBrushProperty : System.Windows.DependencyProperty
    static val BorderThicknessProperty : System.Windows.DependencyProperty
    static val BackgroundProperty : System.Windows.DependencyProperty
    static val ForegroundProperty : System.Windows.DependencyProperty
    static val FontFamilyProperty : System.Windows.DependencyProperty
    static val FontSizeProperty : System.Windows.DependencyProperty
    static val FontStretchProperty : System.Windows.DependencyProperty
    static val FontStyleProperty : System.Windows.DependencyProperty
    static val FontWeightProperty : System.Windows.DependencyProperty
    static val HorizontalContentAlignmentProperty : System.Windows.DependencyProperty
    static val VerticalContentAlignmentProperty : System.Windows.DependencyProperty
    static val TabIndexProperty : System.Windows.DependencyProperty
    static val IsTabStopProperty : System.Windows.DependencyProperty
    static val PaddingProperty : System.Windows.DependencyProperty
    static val TemplateProperty : System.Windows.DependencyProperty
    static val PreviewMouseDoubleClickEvent : System.Windows.RoutedEvent
    static val MouseDoubleClickEvent : System.Windows.RoutedEvent
  end

Full name: System.Windows.Controls.Control

  type: Control
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
val mutable keysDown : Set<Key>

  type: Set<Key>
  implements: IComparable
  implements: Collections.Generic.ICollection<Key>
  implements: seq<Key>
  implements: Collections.IEnumerable
Multiple items
module Set

from Microsoft.FSharp.Collections

--------------------

type Set<'T (requires comparison)> =
  class
    interface IComparable
    interface Collections.IEnumerable
    interface Collections.Generic.IEnumerable<'T>
    interface Collections.Generic.ICollection<'T>
    new : elements:seq<'T> -> Set<'T>
    member Add : value:'T -> Set<'T>
    member Contains : value:'T -> bool
    override Equals : obj -> bool
    member IsProperSubsetOf : otherSet:Set<'T> -> bool
    member IsProperSupersetOf : otherSet:Set<'T> -> bool
    member IsSubsetOf : otherSet:Set<'T> -> bool
    member IsSupersetOf : otherSet:Set<'T> -> bool
    member Remove : value:'T -> Set<'T>
    member Count : int
    member IsEmpty : bool
    member MaximumElement : 'T
    member MinimumElement : 'T
    static member ( + ) : set1:Set<'T> * set2:Set<'T> -> Set<'T>
    static member ( - ) : set1:Set<'T> * set2:Set<'T> -> Set<'T>
  end

Full name: Microsoft.FSharp.Collections.Set<_>

  type: Set<'T>
  implements: IComparable
  implements: Collections.Generic.ICollection<'T>
  implements: seq<'T>
  implements: Collections.IEnumerable
val empty<'T (requires comparison)> : Set<'T> (requires comparison)

Full name: Microsoft.FSharp.Collections.Set.empty
event UIElement.KeyDown: IEvent<KeyEventHandler,KeyEventArgs>
val e : KeyEventArgs

  type: KeyEventArgs
  inherits: KeyboardEventArgs
  inherits: InputEventArgs
  inherits: RoutedEventArgs
  inherits: EventArgs
member Set.Add : value:'T -> Set<'T>
property KeyEventArgs.Key: Key
event UIElement.KeyUp: IEvent<KeyEventHandler,KeyEventArgs>
member Set.Remove : value:'T -> Set<'T>
val this : KeyState
member KeyState.IsKeyDown : key:Key -> bool

Full name: Snippet.KeyState.IsKeyDown
val key : Key

  type: Key
  inherits: Enum
  inherits: ValueType
member Set.Contains : value:'T -> bool
type Pad =
  class
    new : keys:KeyState * up:Key * down:Key * x:int * y:int -> Pad
    member Update : unit -> unit
    member Shape : Rectangle
  end

Full name: Snippet.Pad
val keys : KeyState
val up : Key

  type: Key
  inherits: Enum
  inherits: ValueType
val down : Key

  type: Key
  inherits: Enum
  inherits: ValueType
val y : int ref

  type: int ref
  implements: Collections.IStructuralEquatable
  implements: IComparable<Ref<int>>
  implements: IComparable
  implements: Collections.IStructuralComparable
val pad : Pad
Multiple items
member Pad.Shape : Rectangle

Full name: Snippet.Pad.Shape

--------------------

type Shape =
  class
    inherit System.Windows.FrameworkElement
    member Fill : System.Windows.Media.Brush with get, set
    member GeometryTransform : System.Windows.Media.Transform
    member RenderedGeometry : System.Windows.Media.Geometry
    member Stretch : System.Windows.Media.Stretch with get, set
    member Stroke : System.Windows.Media.Brush with get, set
    member StrokeDashArray : System.Windows.Media.DoubleCollection with get, set
    member StrokeDashCap : System.Windows.Media.PenLineCap with get, set
    member StrokeDashOffset : float with get, set
    member StrokeEndLineCap : System.Windows.Media.PenLineCap with get, set
    member StrokeLineJoin : System.Windows.Media.PenLineJoin with get, set
    member StrokeMiterLimit : float with get, set
    member StrokeStartLineCap : System.Windows.Media.PenLineCap with get, set
    member StrokeThickness : float with get, set
    static val StretchProperty : System.Windows.DependencyProperty
    static val FillProperty : System.Windows.DependencyProperty
    static val StrokeProperty : System.Windows.DependencyProperty
    static val StrokeThicknessProperty : System.Windows.DependencyProperty
    static val StrokeStartLineCapProperty : System.Windows.DependencyProperty
    static val StrokeEndLineCapProperty : System.Windows.DependencyProperty
    static val StrokeDashCapProperty : System.Windows.DependencyProperty
    static val StrokeLineJoinProperty : System.Windows.DependencyProperty
    static val StrokeMiterLimitProperty : System.Windows.DependencyProperty
    static val StrokeDashOffsetProperty : System.Windows.DependencyProperty
    static val StrokeDashArrayProperty : System.Windows.DependencyProperty
  end

Full name: System.Windows.Shapes.Shape

  type: Shape
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
member Pad.Update : unit -> unit

Full name: Snippet.Pad.Update
member KeyState.IsKeyDown : key:Key -> bool
type Ball =
  class
    new : blocks:Rectangle list -> Ball
    member Update : unit -> unit
    member Shape : Rectangle
  end

Full name: Snippet.Ball
val blocks : Rectangle list

  type: Rectangle list
  implements: Collections.IStructuralEquatable
  implements: IComparable<List<Rectangle>>
  implements: IComparable
  implements: Collections.IStructuralComparable
  implements: Collections.Generic.IEnumerable<Rectangle>
  implements: Collections.IEnumerable
type 'T list = List<'T>

Full name: Microsoft.FSharp.Collections.list<_>

  type: 'T list
  implements: Collections.IStructuralEquatable
  implements: IComparable<List<'T>>
  implements: IComparable
  implements: Collections.IStructuralComparable
  implements: Collections.Generic.IEnumerable<'T>
  implements: Collections.IEnumerable
val bx : int ref

  type: int ref
  implements: Collections.IStructuralEquatable
  implements: IComparable<Ref<int>>
  implements: IComparable
  implements: Collections.IStructuralComparable
val by : int ref

  type: int ref
  implements: Collections.IStructuralEquatable
  implements: IComparable<Ref<int>>
  implements: IComparable
  implements: Collections.IStructuralComparable
val bdx : int ref

  type: int ref
  implements: Collections.IStructuralEquatable
  implements: IComparable<Ref<int>>
  implements: IComparable
  implements: Collections.IStructuralComparable
val bdy : int ref

  type: int ref
  implements: Collections.IStructuralEquatable
  implements: IComparable<Ref<int>>
  implements: IComparable
  implements: Collections.IStructuralComparable
val ball : Ball
Multiple items
member Ball.Shape : Rectangle

Full name: Snippet.Ball.Shape

--------------------

type Shape =
  class
    inherit System.Windows.FrameworkElement
    member Fill : System.Windows.Media.Brush with get, set
    member GeometryTransform : System.Windows.Media.Transform
    member RenderedGeometry : System.Windows.Media.Geometry
    member Stretch : System.Windows.Media.Stretch with get, set
    member Stroke : System.Windows.Media.Brush with get, set
    member StrokeDashArray : System.Windows.Media.DoubleCollection with get, set
    member StrokeDashCap : System.Windows.Media.PenLineCap with get, set
    member StrokeDashOffset : float with get, set
    member StrokeEndLineCap : System.Windows.Media.PenLineCap with get, set
    member StrokeLineJoin : System.Windows.Media.PenLineJoin with get, set
    member StrokeMiterLimit : float with get, set
    member StrokeStartLineCap : System.Windows.Media.PenLineCap with get, set
    member StrokeThickness : float with get, set
    static val StretchProperty : System.Windows.DependencyProperty
    static val FillProperty : System.Windows.DependencyProperty
    static val StrokeProperty : System.Windows.DependencyProperty
    static val StrokeThicknessProperty : System.Windows.DependencyProperty
    static val StrokeStartLineCapProperty : System.Windows.DependencyProperty
    static val StrokeEndLineCapProperty : System.Windows.DependencyProperty
    static val StrokeDashCapProperty : System.Windows.DependencyProperty
    static val StrokeLineJoinProperty : System.Windows.DependencyProperty
    static val StrokeMiterLimitProperty : System.Windows.DependencyProperty
    static val StrokeDashOffsetProperty : System.Windows.DependencyProperty
    static val StrokeDashArrayProperty : System.Windows.DependencyProperty
  end

Full name: System.Windows.Shapes.Shape

  type: Shape
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
member Ball.Update : unit -> unit

Full name: Snippet.Ball.Update
val block : Rectangle

  type: Rectangle
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  inherits: Shape
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
property FrameworkElement.Width: float
property FrameworkElement.Height: float
type GameControl =
  class
    inherit UserControl
    new : unit -> GameControl
  end

Full name: Snippet.GameControl

  type: GameControl
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  implements: Markup.IAddChild
  inherits: UserControl
  inherits: ContentControl
  inherits: Control
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
val control : GameControl

  type: GameControl
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  implements: Markup.IAddChild
  inherits: UserControl
  inherits: ContentControl
  inherits: Control
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
type UserControl =
  class
    inherit System.Windows.Controls.ContentControl
    new : unit -> System.Windows.Controls.UserControl
  end

Full name: System.Windows.Controls.UserControl

  type: UserControl
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  implements: Markup.IAddChild
  inherits: ContentControl
  inherits: Control
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
val canvas : Canvas

  type: Canvas
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  implements: Markup.IAddChild
  inherits: Panel
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
property Colors.Black: Color
val top : Rectangle

  type: Rectangle
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  inherits: Shape
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
val bottom : Rectangle

  type: Rectangle
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  inherits: Shape
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
val pad1 : Pad
val pad2 : Pad
type Key =
  | None = 0
  | Cancel = 1
  | Back = 2
  | Tab = 3
  | LineFeed = 4
  | Clear = 5
  | Return = 6
  | Enter = 6
  | Pause = 7
  | Capital = 8
  | CapsLock = 8
  | KanaMode = 9
  | HangulMode = 9
  | JunjaMode = 10
  | FinalMode = 11
  | HanjaMode = 12
  | KanjiMode = 12
  | Escape = 13
  | ImeConvert = 14
  | ImeNonConvert = 15
  | ImeAccept = 16
  | ImeModeChange = 17
  | Space = 18
  | Prior = 19
  | PageUp = 19
  | Next = 20
  | PageDown = 20
  | End = 21
  | Home = 22
  | Left = 23
  | Up = 24
  | Right = 25
  | Down = 26
  | Select = 27
  | Print = 28
  | Execute = 29
  | Snapshot = 30
  | PrintScreen = 30
  | Insert = 31
  | Delete = 32
  | Help = 33
  | D0 = 34
  | D1 = 35
  | D2 = 36
  | D3 = 37
  | D4 = 38
  | D5 = 39
  | D6 = 40
  | D7 = 41
  | D8 = 42
  | D9 = 43
  | A = 44
  | B = 45
  | C = 46
  | D = 47
  | E = 48
  | F = 49
  | G = 50
  | H = 51
  | I = 52
  | J = 53
  | K = 54
  | L = 55
  | M = 56
  | N = 57
  | O = 58
  | P = 59
  | Q = 60
  | R = 61
  | S = 62
  | T = 63
  | U = 64
  | V = 65
  | W = 66
  | X = 67
  | Y = 68
  | Z = 69
  | LWin = 70
  | RWin = 71
  | Apps = 72
  | Sleep = 73
  | NumPad0 = 74
  | NumPad1 = 75
  | NumPad2 = 76
  | NumPad3 = 77
  | NumPad4 = 78
  | NumPad5 = 79
  | NumPad6 = 80
  | NumPad7 = 81
  | NumPad8 = 82
  | NumPad9 = 83
  | Multiply = 84
  | Add = 85
  | Separator = 86
  | Subtract = 87
  | Decimal = 88
  | Divide = 89
  | F1 = 90
  | F2 = 91
  | F3 = 92
  | F4 = 93
  | F5 = 94
  | F6 = 95
  | F7 = 96
  | F8 = 97
  | F9 = 98
  | F10 = 99
  | F11 = 100
  | F12 = 101
  | F13 = 102
  | F14 = 103
  | F15 = 104
  | F16 = 105
  | F17 = 106
  | F18 = 107
  | F19 = 108
  | F20 = 109
  | F21 = 110
  | F22 = 111
  | F23 = 112
  | F24 = 113
  | NumLock = 114
  | Scroll = 115
  | LeftShift = 116
  | RightShift = 117
  | LeftCtrl = 118
  | RightCtrl = 119
  | LeftAlt = 120
  | RightAlt = 121
  | BrowserBack = 122
  | BrowserForward = 123
  | BrowserRefresh = 124
  | BrowserStop = 125
  | BrowserSearch = 126
  | BrowserFavorites = 127
  | BrowserHome = 128
  | VolumeMute = 129
  | VolumeDown = 130
  | VolumeUp = 131
  | MediaNextTrack = 132
  | MediaPreviousTrack = 133
  | MediaStop = 134
  | MediaPlayPause = 135
  | LaunchMail = 136
  | SelectMedia = 137
  | LaunchApplication1 = 138
  | LaunchApplication2 = 139
  | Oem1 = 140
  | OemSemicolon = 140
  | OemPlus = 141
  | OemComma = 142
  | OemMinus = 143
  | OemPeriod = 144
  | Oem2 = 145
  | OemQuestion = 145
  | Oem3 = 146
  | OemTilde = 146
  | AbntC1 = 147
  | AbntC2 = 148
  | Oem4 = 149
  | OemOpenBrackets = 149
  | Oem5 = 150
  | OemPipe = 150
  | Oem6 = 151
  | OemCloseBrackets = 151
  | Oem7 = 152
  | OemQuotes = 152
  | Oem8 = 153
  | Oem102 = 154
  | OemBackslash = 154
  | ImeProcessed = 155
  | System = 156
  | OemAttn = 157
  | DbeAlphanumeric = 157
  | OemFinish = 158
  | DbeKatakana = 158
  | OemCopy = 159
  | DbeHiragana = 159
  | OemAuto = 160
  | DbeSbcsChar = 160
  | OemEnlw = 161
  | DbeDbcsChar = 161
  | OemBackTab = 162
  | DbeRoman = 162
  | Attn = 163
  | DbeNoRoman = 163
  | CrSel = 164
  | DbeEnterWordRegisterMode = 164
  | ExSel = 165
  | DbeEnterImeConfigureMode = 165
  | EraseEof = 166
  | DbeFlushString = 166
  | Play = 167
  | DbeCodeInput = 167
  | Zoom = 168
  | DbeNoCodeInput = 168
  | NoName = 169
  | DbeDetermineString = 169
  | Pa1 = 170
  | DbeEnterDialogConversionMode = 170
  | OemClear = 171
  | DeadCharProcessed = 172

Full name: System.Windows.Input.Key

  type: Key
  inherits: Enum
  inherits: ValueType
field Key.Q = 60
field Key.A = 44
field Key.P = 59
field Key.L = 55
property Pad.Shape: Rectangle
val container : Panel

  type: Panel
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  implements: Markup.IAddChild
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
type Panel =
  class
    inherit System.Windows.FrameworkElement
    member Background : System.Windows.Media.Brush with get, set
    member Children : System.Windows.Controls.UIElementCollection
    member IsItemsHost : bool with get, set
    member ShouldSerializeChildren : unit -> bool
    static val BackgroundProperty : System.Windows.DependencyProperty
    static val IsItemsHostProperty : System.Windows.DependencyProperty
    static val ZIndexProperty : System.Windows.DependencyProperty
    static member GetZIndex : System.Windows.UIElement -> int
    static member SetZIndex : System.Windows.UIElement * int -> unit
  end

Full name: System.Windows.Controls.Panel

  type: Panel
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: ComponentModel.ISupportInitialize
  implements: Markup.IHaveResources
  implements: Markup.IQueryAmbient
  implements: Markup.IAddChild
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
val item : UIElement

  type: UIElement
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IInputElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
property Panel.Children: UIElementCollection
UIElementCollection.Add(element: UIElement) : int
property Ball.Shape: Rectangle
member Pad.Update : unit -> unit
member Ball.Update : unit -> unit
val async : AsyncBuilder

Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.async
event UIElement.MouseLeftButtonDown: IEvent<MouseButtonEventHandler,MouseButtonEventArgs>
Multiple items
type Async<'T>

Full name: Microsoft.FSharp.Control.Async<_>

--------------------

type Async
with
  static member AsBeginEnd : computation:('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
  static member AwaitEvent : event:IEvent<'Del,'T> * ?cancelAction:(unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate)
  static member AwaitIAsyncResult : iar:IAsyncResult * ?millisecondsTimeout:int -> Async<bool>
  static member AwaitTask : task:Threading.Tasks.Task<'T> -> Async<'T>
  static member AwaitWaitHandle : waitHandle:Threading.WaitHandle * ?millisecondsTimeout:int -> Async<bool>
  static member CancelDefaultToken : unit -> unit
  static member Catch : computation:Async<'T> -> Async<Choice<'T,exn>>
  static member FromBeginEnd : beginAction:(AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
  static member FromBeginEnd : arg:'Arg1 * beginAction:('Arg1 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
  static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
  static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
  static member FromContinuations : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T>
  static member Ignore : computation:Async<'T> -> Async<unit>
  static member OnCancel : interruption:(unit -> unit) -> Async<IDisposable>
  static member Parallel : computations:seq<Async<'T>> -> Async<'T []>
  static member RunSynchronously : computation:Async<'T> * ?timeout:int * ?cancellationToken:Threading.CancellationToken -> 'T
  static member Sleep : millisecondsDueTime:int -> Async<unit>
  static member Start : computation:Async<unit> * ?cancellationToken:Threading.CancellationToken -> unit
  static member StartAsTask : computation:Async<'T> * ?taskCreationOptions:Threading.Tasks.TaskCreationOptions * ?cancellationToken:Threading.CancellationToken -> Threading.Tasks.Task<'T>
  static member StartChild : computation:Async<'T> * ?millisecondsTimeout:int -> Async<Async<'T>>
  static member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions:Threading.Tasks.TaskCreationOptions -> Async<Threading.Tasks.Task<'T>>
  static member StartImmediate : computation:Async<unit> * ?cancellationToken:Threading.CancellationToken -> unit
  static member StartWithContinuations : computation:Async<'T> * continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * ?cancellationToken:Threading.CancellationToken -> unit
  static member SwitchToContext : syncContext:Threading.SynchronizationContext -> Async<unit>
  static member SwitchToNewThread : unit -> Async<unit>
  static member SwitchToThreadPool : unit -> Async<unit>
  static member TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T>
  static member CancellationToken : Async<Threading.CancellationToken>
  static member DefaultCancellationToken : Threading.CancellationToken
end

Full name: Microsoft.FSharp.Control.Async
static member Async.AwaitEvent : event:IEvent<'Del,'T> * ?cancelAction:(unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate)
static member Async.Ignore : computation:Async<'T> -> Async<unit>
static member Async.StartImmediate : computation:Async<unit> * ?cancellationToken:Threading.CancellationToken -> unit
#if INTERACTIVE
open Microsoft.TryFSharp
App.Dispatch (fun() ->
    App.Console.ClearCanvas()
    let canvas = App.Console.Canvas
    let control = GameControl()
    control |> canvas.Children.Add
    App.Console.CanvasPosition <- CanvasPosition.Right
    control.Focus() |> ignore
)
#endif

More information

Link: http://fssnip.net/aa/
Posted: 3 months ago
Author: Phillip Trelford (website)
Tags: Silverlight, Game, Async