Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
/** @property */ protected Object get_DefaultStyleKey () /** @property */ protected void set_DefaultStyleKey (Object value)
protected internal function get DefaultStyleKey () : Object protected internal function set DefaultStyleKey (value : Object)
Property ValueThe style key. To work correctly as part of theme style lookup, this value is expected to be the Type of the element being styled. a null reference (Nothing in Visual Basic) is an accepted value for a certain case; see Remarks.
This property is typically not set through any of its direct setters. Instead, you override the type-specific metadata of this dependency property every time you create a new subclass. When you subclass, call the OverrideMetadata method against the DefaultStyleKeyProperty identifier, within the static constructor of the control subclass.
For instance, an inline class such as Bold actually has very little implementation beyond overriding the DefaultStyleKey metadata in its static constructor, and exposing several instance constructors. The fact that elements surrounded by the Bold tag gain a FontWeight property of Bold is implemented within the theme style that was referenced by setting the default value of DefaultStyleKey to typeof(Bold).
If you want your element or control to deliberately not use theme styles, set the OverridesDefaultStyle property to true.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.