Style(TypeName) constructor
Collapse the table of content
Expand the table of content

Style.Style(TypeName) constructor

Initializes a new instance of the Style class, with a specified initial TargetType and an empty Setters collection.

Syntax


public Style(
  Type targetType
)

Parameters

targetType

Type: System.Type [.NET] | TypeName [C++]

The TargetType to set for the Style.

Remarks

Important  
 

If you are programming using a .NET language (C# or Visual Basic), the TypeName type projects as System.Type. This is not correctly indicated in the C# and Visual Basic syntaxes above; the targetType parameter should take a System.Type. When programming using C#, it is common to use the typeof operator to get references to the System.Type of a type. In Visual Basic, use GetType.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

Style
Style

 

 

Show:
© 2016 Microsoft