C# Class Microsoft.Silverlight.Toolkit.Build.Tasks.DefaultStyle

DefaultStyle represents the XAML of an individual Control's default style (in particular its ControlTemplate) which can be merged with other default styles). The XAML must have a ResourceDictionary as its root element and be marked with a DefaultStyle build action in Visual Studio.
显示文件 Open project: garyjohnson/wpnest Class Usage Examples

Private Properties

Property Type Description
GetAttribute string
LowerNamespace void
Merge void

Public Methods

Method Description
GenerateXaml ( ) : string

Generate the XAML markup for the default style.

Load ( string path ) : DefaultStyle

Load a DefaultStyle from the a project item.

Merge ( IEnumerable styles ) : DefaultStyle

Merge a sequence of DefaultStyles into a single style.

ToString ( ) : string

Generate the XAML markup for the default style.

Protected Methods

Method Description
DefaultStyle ( ) : System

Initializes a new instance of the DefaultStyle class.

Private Methods

Method Description
GetAttribute ( System.Xml.Linq.XElement element ) : string

Get the value of the first attribute that is defined.

LowerNamespace ( string prefix ) : void

Lower a namespace from the root ResourceDictionary to its child resources.

Merge ( DefaultStyle other ) : void

Merge with another DefaultStyle.

Method Details

DefaultStyle() protected method

Initializes a new instance of the DefaultStyle class.
protected DefaultStyle ( ) : System
return System

GenerateXaml() public method

Generate the XAML markup for the default style.
public GenerateXaml ( ) : string
return string

Load() public static method

Load a DefaultStyle from the a project item.
public static Load ( string path ) : DefaultStyle
path string /// Path of the default style which is used for reporting errors. ///
return DefaultStyle

Merge() public static method

Merge a sequence of DefaultStyles into a single style.
public static Merge ( IEnumerable styles ) : DefaultStyle
styles IEnumerable Sequence of DefaultStyles.
return DefaultStyle

ToString() public method

Generate the XAML markup for the default style.
public ToString ( ) : string
return string