Snippets tagged silverlight

  • ObservableObject

    The ObservableObject type implements the INotifyPropertyChanged interface used in WPF and Silverlight to notify on changes to properties that are bound to a control. Specify property names type safely using F# Quotations, i.e. <@ this.PropertyName @> when invoking the NotifyPropertyChanged method. If you are following the MVVM pattern then your View Model class can inherit from the ObservableObject type.

    59 people like this

    Posted: 6 years ago by Phillip Trelford

  • F# Quotations with INotifyPropertyChanged

    ViewModelBase for F# users who want to use it in WPF / Silverlight

    12 people like this

    Posted: 5 years ago by Fahad

  • Calculator

    Simple Silverlight Calculator UI interactive sample runnable inside http://tryfsharp.org.

    0 people like this

    Posted: 5 years ago by Phillip Trelford

  • Simple F# ViewModel for Silverlight MVVM

    Silverlight default architecture is Model-View-ViewModel. This code gives full design time support for Microsoft Expression Blend. The F# ViewModel is seen as strongly typed data source in the Blend UI. There are two properties binded to the view: HiLabel (OneWay data binding) and MyName (TwoWay data binding). ViewModel implements the INotifyPropertyChanged to support the binding. The view project (HelloApp) is made with Blend (by designers) and it is Silverlight 5.0 project. The view codebehind is c# file and it has only this.DataContext -assignment. The viewmodel project (HelloApp.ViewModel) is F# Silverlight 4.0 library. It is made with VS2010 and F# (by developers). It contains the logical functionality of the current view.

    5 people like this

    Posted: 5 years ago by Tuomas Hietanen

  • Tetris

    Playable Tetris mini-game. Use arrow keys to move left and right and up to rotate, down to drop. Try it out in the browser on TryFSharp.org

    14 people like this

    Posted: 5 years ago by Phillip Trelford

  • Still Mouse Click Event Using Scan

    Detects a mouse down then up event without a move.

    4 people like this

    Posted: 5 years ago by Zach Bray

  • Growing Tree Algorithm for Maze Generation

    There are several maze creation algorithms (http://www.astrolog.org/labyrnth/algrithm.htm). The interesting point about Growing Tree one is that it turns into the others (for example, Recursive Backtracker and Prim's algo) when we choose the next step in different ways. Check it with tryfsharp.org.

    9 people like this

    Posted: 5 years ago by Natallie Baikevich

  • Pong

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

    7 people like this

    Posted: 5 years ago by Phillip Trelford

  • WPF Command in F#

    demonstrate how to use object expression to create a WPF/Silverlight command.

    22 people like this

    Posted: 5 years ago by Tao Liu

  • Minesweeper Kata 2

    Solution to Minesweeper Kata second challenge at Goto Copenhagen 2012 conference "Programming with the Stars" track. Runnable at http://tryfsharp.org.

    2 people like this

    Posted: 4 years ago by Phillip Trelford

  • WPF/Silverlight Attached Property

    Example of a WPF/Silverlight Attached Property (AP). This is a port of a C# AP implementation that can be found at http://www.silverlightshow.net/items/Attached-Properties-in-Silverlight.aspx.

    0 people like this

    Posted: 5 months ago by Daniel Mohl