LEADTOOLS Windows Forms (Leadtools.WinForms assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
HorizontalAlignMode Property
See Also 
Leadtools.WinForms Namespace > RasterImageViewer Class : HorizontalAlignMode Property



Gets or sets a value to determine how to center the image in the control's client area horizontally, when the width of the destination rectangle is smaller than the width of the client area.

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Select one of the center modes available to the control (near, center or Far).")>
<CategoryAttribute("Appearance")>
Public Overridable Property HorizontalAlignMode As RasterPaintAlignMode
Visual Basic (Usage)Copy Code
Dim instance As RasterImageViewer
Dim value As RasterPaintAlignMode
 
instance.HorizontalAlignMode = value
 
value = instance.HorizontalAlignMode
C# 
[DescriptionAttribute("Select one of the center modes available to the control (near, center or Far).")]
[CategoryAttribute("Appearance")]
public virtual RasterPaintAlignMode HorizontalAlignMode {get; set;}
C++/CLI 
[DescriptionAttribute("Select one of the center modes available to the control (near, center or Far).")]
[CategoryAttribute("Appearance")]
public:
virtual property RasterPaintAlignMode HorizontalAlignMode {
   RasterPaintAlignMode get();
   void set (    RasterPaintAlignMode value);
}

Property Value

An Leadtools.RasterPaintAlignMode enumeration value that determine how to center the image in the control's client area horizontally, when the width of the destination rectangle is smaller than the width of the client area.

Example

Remarks

For example, this can be used to center a small image when it is displayed in a control that is larger than the image's dimensions (Leadtools.RasterImage.Width x Leadtools.RasterImage.Height).

This can also be used in conjunction with the VerticalAlignMode property, SizeMode property and the ScaleFactor property to center an image when the zoomed display dimensions are smaller than the control's dimensions.

Note that RasterPaintAlignMode.CenterAlways is not currently supported for this control.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also