LEADTOOLS WPF and Silverlight (Leadtools.Windows.Controls assembly)
LEAD Technologies, Inc

SizeMode Enumeration






Determines how the control displays the image and the automatic adjustments of the display rectangles. .NET support Silverlight support
Syntax
'Declaration
 
Public Enum SizeMode 
   Inherits System.Enum
   Implements System.IComparableSystem.IConvertibleSystem.IFormattable 
'Usage
 
Dim instance As SizeMode
Leadtools.Windows.Controls.SizeMode = function() { };
Leadtools.Windows.Controls.SizeMode.prototype = {
LeadtoolsMemberMarker(replace me) };
public enum class SizeMode : public System.Enum, System.IComparableSystem.IConvertibleSystem.IFormattable  
Members
MemberDescription
Fit

Fit the image into the viewing area while maintaining the aspect ratio. If the image size is smaller than the viewing area, no resizing is done.

FitAlways

Always fit the image into the viewing area while maintaining the aspect ratio even if the image size is smaller than the viewing area.

FitWidth

Fit the image width to be the size of the width of the viewing area while maintaining the aspect ratio.

Normal

Normal, no sizing.

Stretch

Fit the image to fill the viewing area. Aspect ratio might not be maintained.

Remarks

The SizeMode enumeration is used as the value for the following properties:

By setting these properties to one of the SizeMode enumeration, the control will use the base class FrameworkElement.MeasureOverride to determine how to fit the image in the viewing area.

When using the Normal size mode with the ImageViewer or RasterImageViewer controls; vertical or horizontal scrollbars may become visible and functional if the image size becomes greater than the viewing area. The image size is determined by the image physical pixel width and height and the values of the UseDpi/> and ScaleFactor properties. The AspectRatioCorrection will also play a role in determining the image size of its value is other than 1. The viewing area size is determined from the current pixel size of the control client area.

When the using the Fit, FitAlways, FitWidth and Stretch size modes; the value of ScaleFactor will always be reset back to 1 and will not be used. Instead, use the read only CurrentXScaleFactor and CurrentYScaleFactor properties to get the actual scale factors used. Note that AspectRatioCorrection will still be used. In the case of FitWidth size mode; vertical scroll might become visible and functional if the image height becomes greater than the viewing area.

Example

For XAML example, refer to SizeMode.

For C#/VB examples, refer to SizeMode.

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Leadtools.Windows.Controls.SizeMode

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Leadtools.Windows.Controls Namespace

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.