Udostępnij za pośrednictwem


DpiHelper.GetDeviceWidth(Window) Method

Definition

Caution

Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.

Extension method for Window that returns its Width in device units

public:
[System::Runtime::CompilerServices::Extension]
 static double GetDeviceWidth(System::Windows::Window ^ window);
public static double GetDeviceWidth (this System.Windows.Window window);
[System.Obsolete("Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.")]
public static double GetDeviceWidth (this System.Windows.Window window);
static member GetDeviceWidth : System.Windows.Window -> double
[<System.Obsolete("Use Microsoft.VisualStudio.Utilities.DpiAwareness instead.")>]
static member GetDeviceWidth : System.Windows.Window -> double
<Extension()>
Public Function GetDeviceWidth (window As Window) As Double

Parameters

window
Window

Window to inspect

Returns

Width in device units

Attributes

Applies to