Click or drag to resize

ExtensionsPxToDip Method (Int32, Boolean)

LightningChart .NET Help
Converts given PX (Screen pixels) to DIP (Device Independent Pixels) values using system DPI settings.

Namespace:  Arction.Wpf.ChartingMVVM.Extensions
Assembly:  Arction.Wpf.ChartingMVVM.LightningChart (in Arction.Wpf.ChartingMVVM.LightningChart.dll) Version: 10.3.1
Syntax
public static float PxToDip(
	this int PX,
	bool UseXDirection = true
)

Parameters

PX
Type: SystemInt32
Value to convert in pixels.
UseXDirection (Optional)
Type: SystemBoolean
If true, the screen width direction DPI factor is used. Height direction otherwise

Return Value

Type: Single
Converted value in DPIs.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Int32. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also