mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-07 23:43:19 +02:00
Initial WPF content migrated (#17)
* Reset branch for WPF changes * Convert BMP to PNG; fix link-out-of-scope err * Add snippets for WPF... 6794 files!!!! * Add missing snippets * update file updated between migration * Fix paths to include * update breadcrumb and toc * fix index links * fix index links * fix index links * fix markdown
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: "How to: Use System Parameters Keys"
|
||||
ms.date: "03/30/2017"
|
||||
helpviewer_keywords:
|
||||
- "resource keys [WPF], SystemParameters class"
|
||||
- "classes [WPF], SystemParameters"
|
||||
ms.assetid: 77571283-d16c-45bb-9f69-cafbbf72b21e
|
||||
---
|
||||
# How to: Use System Parameters Keys
|
||||
System resources expose a number of system metrics as resources to help developers create visuals that are consistent with system settings. <xref:System.Windows.SystemParameters> is a class that contains both system parameter values and resource keys that bind to the values—for example, <xref:System.Windows.SystemParameters.FullPrimaryScreenHeight%2A> and <xref:System.Windows.SystemParameters.FullPrimaryScreenHeightKey%2A>. System parameter metrics can be used as either static or dynamic resources. Use a dynamic resource if you want the parameter metric to update automatically while the application runs; otherwise use a static resource.
|
||||
|
||||
> [!NOTE]
|
||||
> Dynamic resources have the keyword *Key* appended to the property name.
|
||||
|
||||
The following example shows how to access and use system parameter dynamic resources to style or customize a button. This [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla-xaml-md.md)] example sizes a button by assigning <xref:System.Windows.SystemParameters> values to the button's width and height.
|
||||
|
||||
## Example
|
||||
[!code-xaml[SystemRes_snip#ParameterDynamicResources](~/samples/snippets/csharp/VS_Snippets_Wpf/SystemRes_snip/CSharp/MyApp.xaml#parameterdynamicresources)]
|
||||
|
||||
## See also
|
||||
|
||||
- [Paint an Area with a System Brush](../graphics-multimedia/how-to-paint-an-area-with-a-system-brush.md)
|
||||
- [Use SystemFonts](how-to-use-systemfonts.md)
|
||||
- [Use SystemParameters](how-to-use-systemparameters.md)
|
||||
Reference in New Issue
Block a user