Leadtools.Windows.Controls Send comments on this topic. | Back to Introduction - LEADTOOLS WPF | Help Version 16.5.9.25
UseDpi Property
See Also 
Leadtools.Windows.Controls Namespace > BitmapSourceViewerElement Class : UseDpi Property





Gets or sets a value that indicates whether LEAD's automated scaling properties are used to account for the physical resolution of the bitmap. This is a dependency property.

Syntax

Visual Basic (Declaration) 
Public Property UseDpi As Boolean
Visual Basic (Usage)Copy Code
Dim instance As BitmapSourceViewerElement
Dim value As Boolean
 
instance.UseDpi = value
 
value = instance.UseDpi
C# 
public bool UseDpi {get; set;}
C++/CLI 
public:
property bool UseDpi {
   bool get();
   void set (bool value);
}
XAML Attributes Usage 

<object UseDpi=bool/>

Dependencies Property Information 

Identifier field

UseDpiProperty

Metadata properties set to true

None

XAML Attributes Usage 

<object UseDpi=bool/>

Dependencies Property Information 

Identifier field

UseDpiProperty

Metadata properties set to true

None

Return Value

true - calculate the width and height for the image according to the BitmapSource.DpiX and BitmapSourcs.DpiY, which can be obtained through BitmapSource.Width and BitmapSource.Height.
false - calculate the width and height for the image according to the BitmapSource.PixelWidth and BitmapSource.PixelHeight. Default value is true. This is the default behaviour in WPF.

Example

For XAML example, refer to Source.

For C#/VB examples, refer to BitmapSourceViewerElement.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family

See Also