SystemFonts.SmallCaptionFontWeightKey Property
Gets the ResourceKey for the SmallCaptionFontWeight property.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
System resources expose a number of system metrics as resources to help developers create visuals that are consistent with system settings. SystemFonts is a class that contains both system font values and system font resources that bind to the values—for example, CaptionFontFamily and CaptionFontFamilyKey.
System font metrics can be used as either static or dynamic resources. Use a dynamic resource if you want the font metric to update automatically while the application runs; otherwise use a static resource.
![]() |
---|
Dynamic resources have the keyword Key appended to the property name. |
The following example shows how to access and use system font dynamic resources to style or customize a button. This XAML example creates a button style that assigns SystemFonts values to a button.
<Style x:Key="SimpleFont" TargetType="{x:Type Button}"> <Setter Property = "FontSize" Value= "{DynamicResource {x:Static SystemFonts.IconFontSizeKey}}"/> <Setter Property = "FontWeight" Value= "{DynamicResource {x:Static SystemFonts.MessageFontWeightKey}}"/> <Setter Property = "FontFamily" Value= "{DynamicResource {x:Static SystemFonts.CaptionFontFamilyKey}}"/> </Style>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.