Questa documentazione è stata archiviata e non viene gestita.

Classe DisableDpiAwarenessAttribute

Allows WPF applications to disable dots per inch (dpi) awareness for all user interface elements.

Spazio dei nomi: System.Windows.Media
Assembly: WindowsBase (in windowsbase.dll)
Spazio dei nomi XML:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple=false)] 
public sealed class DisableDpiAwarenessAttribute : Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple=false) */ 
public final class DisableDpiAwarenessAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple=false) 
public final class DisableDpiAwarenessAttribute extends Attribute
<DisableDpiAwarenessAttribute .../>

By default, WPF applications are dpi aware, which affects how user interface layout is calculated. However, an application can disable dpi awareness by adding the DisableDpiAwarenessAttribute to the application assembly.

AvvisoAttenzione:

It is not recommended that you set this attribute for your application, unless you need all user interface elements of your application to be non-dpi aware.

The following example shows how to disable Dpi awareness for the WPF application by declaring DisableDpiAwarenessAttribute at the assembly level.

// Disable Dpi awareness in the application assembly.
[assembly: System.Windows.Media.DisableDpiAwareness]

System.Object
   System.Attribute
    System.Windows.Media.DisableDpiAwarenessAttribute

I membri statici pubblici (Shared in Visual Basic) di questo tipo sono validi per le operazioni multithreading. I membri di istanza non sono garantiti come thread safe.

Microsoft .NET Framework 3.0 è supportato in Windows Vista, Microsoft Windows XP SP2 e Windows Server 2003 SP1.

.NET Framework

Supportato in:
Mostra: