Gets or sets a value that indicates the horizontal alignment for the image in this control.
public Leadtools.Controls.ControlAlignment ImageHorizontalAlignment {get; set;}
Public Property ImageHorizontalAlignment As Leadtools.Controls.ControlAlignment
public Leadtools.Controls.ControlAlignment ImageHorizontalAlignment {get; set;}
@property (nonatomic, assign) LTControlAlignment imageHorizontalAlignment
public ControlAlignment getImageHorizontalAlignment()
public void setImageHorizontalAlignment(ControlAlignment alignment)
get_ImageHorizontalAlignment();
set_ImageHorizontalAlignment(value);
Object.defineProperty('ImageHorizontalAlignment');
The horizontal alignment for the image in this control. The default value is ControlAlignment.Near (left).
Changing the value of this property will fire the PropertyChanged and TransformChanged events.
Use ImageVerticalAlignment to set the vertical alignment for the image in the control.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Controls;
public void ImageHorizontalAlignmentExample()
{
// Loop through the image horizontal and vertical alignments
ControlAlignment horizontalAlignment = _viewer.ImageHorizontalAlignment;
ControlAlignment verticalAlignment = _viewer.ImageVerticalAlignment;
if(horizontalAlignment == ControlAlignment.Near)
horizontalAlignment = ControlAlignment.Center;
else if(horizontalAlignment == ControlAlignment.Center)
horizontalAlignment = ControlAlignment.Far;
else if(horizontalAlignment == ControlAlignment.Far)
horizontalAlignment = ControlAlignment.Near;
if(verticalAlignment == ControlAlignment.Near)
verticalAlignment = ControlAlignment.Center;
else if(verticalAlignment == ControlAlignment.Center)
verticalAlignment = ControlAlignment.Far;
else if(verticalAlignment == ControlAlignment.Far)
verticalAlignment = ControlAlignment.Near;
// Show the values in the label
string[] controlAlignmentNames = { "Near", "Center", "Far" };
_infoLabel.Text = controlAlignmentNames[(int)horizontalAlignment] + " and " + controlAlignmentNames[(int)verticalAlignment];
// Set the new values in _viewer
_viewer.ImageHorizontalAlignment = horizontalAlignment;
_viewer.ImageVerticalAlignment = verticalAlignment;
}
Products |
Support |
Feedback: ImageHorizontalAlignment Property - OLeadtools.Controls |
Introduction |
Help Version 19.0.2017.3.23
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.