Export (0) Print
Expand All
Expand Minimize

SystemParameters.MenuDropAlignmentKey Property

Gets the ResourceKey for the MenuDropAlignment property.

Namespace:  System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public static ResourceKey MenuDropAlignmentKey { get; }
<object property="{DynamicResource {x:Static SystemParameters.MenuDropAlignmentKey}}"/>

Property Value

Type: System.Windows.ResourceKey
A resource key.

System resources expose a number of system metrics as resources to help developers create visuals that are consistent with system settings. SystemParameters is a class that contains both system parameter values and resource keys that bind to the values—for example, FullPrimaryScreenHeight and FullPrimaryScreenHeightKey. 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.

NoteNote:

Dynamic resources have the ke yword 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 XAML example sizes a button by assigning SystemParameters values to the button's width and height.

<Style x:Key="SimpleParam" TargetType="{x:Type Button}">
    <Setter Property = "Height" Value= "{DynamicResource {x:Static SystemParameters.CaptionHeightKey}}"/>
    <Setter Property = "Width" Value= "{DynamicResource {x:Static SystemParameters.IconGridWidthKey}}"/>
</Style>

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft