Load XAML

This example shows how to load a Xaml file allowing to use WPF from F#. It also shows how to access WPF objects and register event handlers.

Copy Source
Copy Link
Tools:
 1: open System.Xml
 2: open System.Windows
 3: open System.Windows.Media
 4: open System.Windows.Markup
 5: open System.Windows.Shapes
 6: open System.Windows.Controls
 7: 
 8: let loadXamlWindow (filename:string) =
 9:   let reader = XmlReader.Create(filename)
10:   XamlReader.Load(reader) :?> Window
11: 
12: let app = new Application()
13: 
14: // Load the window.xaml file
15: let w = loadXamlWindow("window.xaml")
16: w.Show()
17: 
18: // We assume that there is an ellipse named Circle
19: let e = w.FindName("Circle") :?> Ellipse
20: 
21: // Register an event handler
22: e.MouseLeftButtonUp.Add(fun _ ->
23:   e.Fill <- 
24:     if e.Fill = (Brushes.Yellow :> Brush) then Brushes.Red
25:     else Brushes.Yellow
26: )
27: 
namespace System
namespace System.Xml
namespace System.Windows
namespace System.Windows.Media
namespace System.Windows.Markup
namespace System.Windows.Shapes
namespace System.Windows.Controls
val loadXamlWindow : string -> Window

Full name: Test.loadXamlWindow
val filename : string

  type: string
  implements: System.IComparable
  implements: System.ICloneable
  implements: System.IConvertible
  implements: System.IComparable<string>
  implements: seq<char>
  implements: System.Collections.IEnumerable
  implements: System.IEquatable<string>
Multiple items
val string : 'T -> string

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

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

type string = System.String

Full name: Microsoft.FSharp.Core.string

  type: string
  implements: System.IComparable
  implements: System.ICloneable
  implements: System.IConvertible
  implements: System.IComparable<string>
  implements: seq<char>
  implements: System.Collections.IEnumerable
  implements: System.IEquatable<string>
val reader : XmlReader

  type: XmlReader
  implements: System.IDisposable
type XmlReader =
  class
    member AttributeCount : int
    member BaseURI : string
    member CanReadBinaryContent : bool
    member CanReadValueChunk : bool
    member CanResolveEntity : bool
    member Close : unit -> unit
    member Depth : int
    member EOF : bool
    member GetAttribute : string -> string
    member GetAttribute : int -> string
    member GetAttribute : string * string -> string
    member HasAttributes : bool
    member HasValue : bool
    member IsDefault : bool
    member IsEmptyElement : bool
    member IsStartElement : unit -> bool
    member IsStartElement : string -> bool
    member IsStartElement : string * string -> bool
    member Item : int -> string
    member Item : string -> string
    member Item : string * string -> string
    member LocalName : string
    member LookupNamespace : string -> string
    member MoveToAttribute : string -> bool
    member MoveToAttribute : int -> unit
    member MoveToAttribute : string * string -> bool
    member MoveToContent : unit -> System.Xml.XmlNodeType
    member MoveToElement : unit -> bool
    member MoveToFirstAttribute : unit -> bool
    member MoveToNextAttribute : unit -> bool
    member Name : string
    member NameTable : System.Xml.XmlNameTable
    member NamespaceURI : string
    member NodeType : System.Xml.XmlNodeType
    member Prefix : string
    member QuoteChar : char
    member Read : unit -> bool
    member ReadAttributeValue : unit -> bool
    member ReadContentAs : System.Type * System.Xml.IXmlNamespaceResolver -> obj
    member ReadContentAsBase64 : System.Byte [] * int * int -> int
    member ReadContentAsBinHex : System.Byte [] * int * int -> int
    member ReadContentAsBoolean : unit -> bool
    member ReadContentAsDateTime : unit -> System.DateTime
    member ReadContentAsDecimal : unit -> decimal
    member ReadContentAsDouble : unit -> float
    member ReadContentAsFloat : unit -> float32
    member ReadContentAsInt : unit -> int
    member ReadContentAsLong : unit -> int64
    member ReadContentAsObject : unit -> obj
    member ReadContentAsString : unit -> string
    member ReadElementContentAs : System.Type * System.Xml.IXmlNamespaceResolver -> obj
    member ReadElementContentAs : System.Type * System.Xml.IXmlNamespaceResolver * string * string -> obj
    member ReadElementContentAsBase64 : System.Byte [] * int * int -> int
    member ReadElementContentAsBinHex : System.Byte [] * int * int -> int
    member ReadElementContentAsBoolean : unit -> bool
    member ReadElementContentAsBoolean : string * string -> bool
    member ReadElementContentAsDateTime : unit -> System.DateTime
    member ReadElementContentAsDateTime : string * string -> System.DateTime
    member ReadElementContentAsDecimal : unit -> decimal
    member ReadElementContentAsDecimal : string * string -> decimal
    member ReadElementContentAsDouble : unit -> float
    member ReadElementContentAsDouble : string * string -> float
    member ReadElementContentAsFloat : unit -> float32
    member ReadElementContentAsFloat : string * string -> float32
    member ReadElementContentAsInt : unit -> int
    member ReadElementContentAsInt : string * string -> int
    member ReadElementContentAsLong : unit -> int64
    member ReadElementContentAsLong : string * string -> int64
    member ReadElementContentAsObject : unit -> obj
    member ReadElementContentAsObject : string * string -> obj
    member ReadElementContentAsString : unit -> string
    member ReadElementContentAsString : string * string -> string
    member ReadElementString : unit -> string
    member ReadElementString : string -> string
    member ReadElementString : string * string -> string
    member ReadEndElement : unit -> unit
    member ReadInnerXml : unit -> string
    member ReadOuterXml : unit -> string
    member ReadStartElement : unit -> unit
    member ReadStartElement : string -> unit
    member ReadStartElement : string * string -> unit
    member ReadState : System.Xml.ReadState
    member ReadString : unit -> string
    member ReadSubtree : unit -> System.Xml.XmlReader
    member ReadToDescendant : string -> bool
    member ReadToDescendant : string * string -> bool
    member ReadToFollowing : string -> bool
    member ReadToFollowing : string * string -> bool
    member ReadToNextSibling : string -> bool
    member ReadToNextSibling : string * string -> bool
    member ReadValueChunk : char [] * int * int -> int
    member ResolveEntity : unit -> unit
    member SchemaInfo : System.Xml.Schema.IXmlSchemaInfo
    member Settings : System.Xml.XmlReaderSettings
    member Skip : unit -> unit
    member Value : string
    member ValueType : System.Type
    member XmlLang : string
    member XmlSpace : System.Xml.XmlSpace
    static member Create : string -> System.Xml.XmlReader
    static member Create : System.IO.Stream -> System.Xml.XmlReader
    static member Create : System.IO.TextReader -> System.Xml.XmlReader
    static member Create : string * System.Xml.XmlReaderSettings -> System.Xml.XmlReader
    static member Create : System.IO.Stream * System.Xml.XmlReaderSettings -> System.Xml.XmlReader
    static member Create : System.IO.TextReader * System.Xml.XmlReaderSettings -> System.Xml.XmlReader
    static member Create : System.Xml.XmlReader * System.Xml.XmlReaderSettings -> System.Xml.XmlReader
    static member Create : string * System.Xml.XmlReaderSettings * System.Xml.XmlParserContext -> System.Xml.XmlReader
    static member Create : System.IO.Stream * System.Xml.XmlReaderSettings * string -> System.Xml.XmlReader
    static member Create : System.IO.Stream * System.Xml.XmlReaderSettings * System.Xml.XmlParserContext -> System.Xml.XmlReader
    static member Create : System.IO.TextReader * System.Xml.XmlReaderSettings * string -> System.Xml.XmlReader
    static member Create : System.IO.TextReader * System.Xml.XmlReaderSettings * System.Xml.XmlParserContext -> System.Xml.XmlReader
    static member IsName : string -> bool
    static member IsNameToken : string -> bool
  end

Full name: System.Xml.XmlReader

  type: XmlReader
  implements: System.IDisposable
Multiple overloads
XmlReader.Create(input: System.IO.TextReader) : XmlReader
XmlReader.Create(input: System.IO.Stream) : XmlReader
XmlReader.Create(inputUri: string) : XmlReader
XmlReader.Create(reader: XmlReader, settings: XmlReaderSettings) : XmlReader
XmlReader.Create(input: System.IO.TextReader, settings: XmlReaderSettings) : XmlReader
XmlReader.Create(input: System.IO.Stream, settings: XmlReaderSettings) : XmlReader
XmlReader.Create(inputUri: string, settings: XmlReaderSettings) : XmlReader
XmlReader.Create(input: System.IO.TextReader, settings: XmlReaderSettings, inputContext: XmlParserContext) : XmlReader
XmlReader.Create(input: System.IO.TextReader, settings: XmlReaderSettings, baseUri: string) : XmlReader
XmlReader.Create(input: System.IO.Stream, settings: XmlReaderSettings, inputContext: XmlParserContext) : XmlReader
   (+2 other overloads)
type XamlReader =
  class
    new : unit -> System.Windows.Markup.XamlReader
    member CancelAsync : unit -> unit
    member LoadAsync : System.IO.Stream -> obj
    member LoadAsync : System.Xml.XmlReader -> obj
    member LoadAsync : System.IO.Stream * System.Windows.Markup.ParserContext -> obj
    static member GetWpfSchemaContext : unit -> System.Xaml.XamlSchemaContext
    static member Load : System.IO.Stream -> obj
    static member Load : System.Xml.XmlReader -> obj
    static member Load : System.Xaml.XamlReader -> obj
    static member Load : System.IO.Stream * System.Windows.Markup.ParserContext -> obj
    static member Parse : string -> obj
    static member Parse : string * System.Windows.Markup.ParserContext -> obj
  end

Full name: System.Windows.Markup.XamlReader
Multiple overloads
XamlReader.Load(reader: System.Xaml.XamlReader) : obj
XamlReader.Load(reader: XmlReader) : obj
XamlReader.Load(stream: System.IO.Stream) : obj
XamlReader.Load(stream: System.IO.Stream, parserContext: ParserContext) : obj
type Window =
  class
    inherit System.Windows.Controls.ContentControl
    new : unit -> System.Windows.Window
    member Activate : unit -> bool
    member AllowsTransparency : bool with get, set
    member Close : unit -> unit
    member DialogResult : System.Nullable<bool> with get, set
    member DragMove : unit -> unit
    member Hide : unit -> unit
    member Icon : System.Windows.Media.ImageSource with get, set
    member IsActive : bool
    member Left : float with get, set
    member OwnedWindows : System.Windows.WindowCollection
    member Owner : System.Windows.Window with get, set
    member ResizeMode : System.Windows.ResizeMode with get, set
    member RestoreBounds : System.Windows.Rect
    member Show : unit -> unit
    member ShowActivated : bool with get, set
    member ShowDialog : unit -> System.Nullable<bool>
    member ShowInTaskbar : bool with get, set
    member SizeToContent : System.Windows.SizeToContent with get, set
    member TaskbarItemInfo : System.Windows.Shell.TaskbarItemInfo with get, set
    member Title : string with get, set
    member Top : float with get, set
    member Topmost : bool with get, set
    member WindowStartupLocation : System.Windows.WindowStartupLocation with get, set
    member WindowState : System.Windows.WindowState with get, set
    member WindowStyle : System.Windows.WindowStyle with get, set
    static val TaskbarItemInfoProperty : System.Windows.DependencyProperty
    static val AllowsTransparencyProperty : System.Windows.DependencyProperty
    static val TitleProperty : System.Windows.DependencyProperty
    static val IconProperty : System.Windows.DependencyProperty
    static val SizeToContentProperty : System.Windows.DependencyProperty
    static val TopProperty : System.Windows.DependencyProperty
    static val LeftProperty : System.Windows.DependencyProperty
    static val ShowInTaskbarProperty : System.Windows.DependencyProperty
    static val IsActiveProperty : System.Windows.DependencyProperty
    static val WindowStyleProperty : System.Windows.DependencyProperty
    static val WindowStateProperty : System.Windows.DependencyProperty
    static val ResizeModeProperty : System.Windows.DependencyProperty
    static val TopmostProperty : System.Windows.DependencyProperty
    static val ShowActivatedProperty : System.Windows.DependencyProperty
    static member GetWindow : System.Windows.DependencyObject -> System.Windows.Window
  end

Full name: System.Windows.Window

  type: Window
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: System.ComponentModel.ISupportInitialize
  implements: IHaveResources
  implements: IQueryAmbient
  implements: IAddChild
  implements: IWindowService
  inherits: ContentControl
  inherits: Control
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
val app : Application

Full name: Test.app

  type: Application
  implements: IHaveResources
  implements: IQueryAmbient
  inherits: Threading.DispatcherObject
type Application =
  class
    inherit System.Windows.Threading.DispatcherObject
    new : unit -> System.Windows.Application
    member FindResource : obj -> obj
    member MainWindow : System.Windows.Window with get, set
    member Properties : System.Collections.IDictionary
    member Resources : System.Windows.ResourceDictionary with get, set
    member Run : unit -> int
    member Run : System.Windows.Window -> int
    member Shutdown : unit -> unit
    member Shutdown : int -> unit
    member ShutdownMode : System.Windows.ShutdownMode with get, set
    member StartupUri : System.Uri with get, set
    member TryFindResource : obj -> obj
    member Windows : System.Windows.WindowCollection
    static member Current : System.Windows.Application
    static member GetContentStream : System.Uri -> System.Windows.Resources.StreamResourceInfo
    static member GetCookie : System.Uri -> string
    static member GetRemoteStream : System.Uri -> System.Windows.Resources.StreamResourceInfo
    static member GetResourceStream : System.Uri -> System.Windows.Resources.StreamResourceInfo
    static member LoadComponent : System.Uri -> obj
    static member LoadComponent : obj * System.Uri -> unit
    static member ResourceAssembly : System.Reflection.Assembly with get, set
    static member SetCookie : System.Uri * string -> unit
  end

Full name: System.Windows.Application

  type: Application
  implements: IHaveResources
  implements: IQueryAmbient
  inherits: Threading.DispatcherObject
val w : Window

Full name: Test.w

  type: Window
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: System.ComponentModel.ISupportInitialize
  implements: IHaveResources
  implements: IQueryAmbient
  implements: IAddChild
  implements: IWindowService
  inherits: ContentControl
  inherits: Control
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
Window.Show() : unit
val e : Ellipse

Full name: Test.e

  type: Ellipse
  implements: Composition.DUCE.IResource
  implements: Animation.IAnimatable
  implements: IFrameworkInputElement
  implements: IInputElement
  implements: System.ComponentModel.ISupportInitialize
  implements: IHaveResources
  implements: IQueryAmbient
  inherits: Shape
  inherits: FrameworkElement
  inherits: UIElement
  inherits: Visual
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
FrameworkElement.FindName(name: string) : obj
type Ellipse =
  class
    inherit System.Windows.Shapes.Shape
    new : unit -> System.Windows.Shapes.Ellipse
    member GeometryTransform : System.Windows.Media.Transform
    member RenderedGeometry : System.Windows.Media.Geometry
  end

Full name: System.Windows.Shapes.Ellipse

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

Full name: System.Windows.Media.Brushes
property Brushes.Yellow: SolidColorBrush
type Brush =
  class
    inherit System.Windows.Media.Animation.Animatable
    member Clone : unit -> System.Windows.Media.Brush
    member CloneCurrentValue : unit -> System.Windows.Media.Brush
    member Opacity : float with get, set
    member RelativeTransform : System.Windows.Media.Transform with get, set
    member ToString : unit -> string
    member ToString : System.IFormatProvider -> string
    member Transform : System.Windows.Media.Transform with get, set
    static val OpacityProperty : System.Windows.DependencyProperty
    static val TransformProperty : System.Windows.DependencyProperty
    static val RelativeTransformProperty : System.Windows.DependencyProperty
  end

Full name: System.Windows.Media.Brush

  type: Brush
  implements: ISealable
  implements: Animation.IAnimatable
  implements: System.IFormattable
  implements: Composition.DUCE.IResource
  inherits: Animation.Animatable
  inherits: Freezable
  inherits: DependencyObject
  inherits: Threading.DispatcherObject
property Brushes.Red: SolidColorBrush

More information

Link: http://fssnip.net/H
Posted: 1 years ago
Author: Antonio Cisternino
Tags: WPF, XAML