C# Class Orchestra.Markup.FontImage

Markup extension that can show a font as image.
Original idea comes from http://www.codeproject.com/Tips/634540/Using-Font-Icons
Inheritance: Catel.Windows.Markup.UpdatableMarkupExtension
ファイルを表示 Open project: WildGums/Orchestra

Private Properties

Property Type Description
CreateGlyph System.Windows.Media.ImageSource
FontImage System
ProvideDynamicValue object

Public Methods

Method Description
FontImage ( string itemName ) : System

Initializes a new instance of the FontImage class.

GetImageSource ( ) : System.Windows.Media.ImageSource
GetRegisteredFont ( string name ) : System.Windows.Media.FontFamily
GetRegisteredFonts ( ) : IEnumerable
RegisterFont ( string name, System.Windows.Media.FontFamily fontFamily ) : void

Protected Methods

Method Description
ProvideDynamicValue ( IServiceProvider serviceProvider ) : object

Private Methods

Method Description
CreateGlyph ( string text, System.Windows.Media.FontFamily fontFamily, System.Windows.FontStyle fontStyle, System.Windows.FontWeight fontWeight, System.Windows.FontStretch fontStretch, System.Windows.Media.Brush foreBrush ) : System.Windows.Media.ImageSource
FontImage ( ) : System
ProvideDynamicValue ( ) : object

Method Details

FontImage() public method

Initializes a new instance of the FontImage class.
public FontImage ( string itemName ) : System
itemName string Name of the resource.
return System

GetImageSource() public method

public GetImageSource ( ) : System.Windows.Media.ImageSource
return System.Windows.Media.ImageSource

GetRegisteredFont() public static method

public static GetRegisteredFont ( string name ) : System.Windows.Media.FontFamily
name string
return System.Windows.Media.FontFamily

GetRegisteredFonts() public static method

public static GetRegisteredFonts ( ) : IEnumerable
return IEnumerable

ProvideDynamicValue() protected method

protected ProvideDynamicValue ( IServiceProvider serviceProvider ) : object
serviceProvider IServiceProvider
return object

RegisterFont() public static method

public static RegisterFont ( string name, System.Windows.Media.FontFamily fontFamily ) : void
name string
fontFamily System.Windows.Media.FontFamily
return void