Style.Style(TypeName) constructor

Applies to Windows and Windows Phone

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

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:
© 2014 Microsoft. All rights reserved.