←Select platform

BorderPadding Property

Summary

Gets the viewer border padding.

Syntax

C#
VB
C++
[BrowsableAttribute(false)] 
public virtual Leadtools.Winforms.ViewerBorderPadding BorderPadding {get;} 
<BrowsableAttribute(False)> 
Public Overridable ReadOnly Property BorderPadding As Leadtools.Winforms.ViewerBorderPadding 
[BrowsableAttribute(false)] 
public: 
virtual property Leadtools.Winforms.ViewerBorderPadding^ BorderPadding { 
   Leadtools.Winforms.ViewerBorderPadding^ get(); 
} 

Property Value

The viewer border padding.

Remarks

The BorderPadding is used to put an empty border around the image display.

Example

This example displays the information about the image and the RasterImageViewer settings.

C#
VB
Imports Leadtools.WinForms 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.ImageProcessing.Color 
Imports Leadtools.Drawing 
 
Private Sub viewer_BorderPadding(ByVal sender As Object, ByVal e As EventArgs) 
   Dim viewer As RasterImageViewer = CType(IIf(TypeOf sender Is RasterImageViewer, sender, Nothing), RasterImageViewer) 
   MessageBox.Show(viewer.SizeMode.ToString()) 
End Sub 
Public Sub RasterImageViewer_BorderPadding(ByVal viewer As RasterImageViewer) 
   Dim b As ViewerBorderPadding = viewer.BorderPadding 
   Dim s As String = String.Format("Border Padding: All {0}  Left {1}  Top {2}  Right {3}  Bottom {4}", b.All, b.Left, b.Top, b.Right, b.Bottom) 
   Console.WriteLine(s) 
   Console.WriteLine("Image Dpi: (" & viewer.ImageDpiX & ", " & viewer.ImageDpiY & ")") 
   Console.WriteLine("Image Size: " & viewer.ImageSize.Width & ", " & viewer.ImageSize.Height) 
 
   s = String.Format("LogicalViewRectangle {0}", viewer.LogicalViewRectangle) 
   Console.WriteLine(s) 
   s = String.Format("PhysicalViewRectangle {0}", viewer.PhysicalViewRectangle) 
   Console.WriteLine(s) 
 
End Sub 
using Leadtools.WinForms; 
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Color; 
using Leadtools.Drawing; 
 
private void viewer_BorderPadding(object sender, EventArgs e) 
{ 
   RasterImageViewer viewer = sender as RasterImageViewer; 
   MessageBox.Show(viewer.SizeMode.ToString()); 
} 
public void RasterImageViewer_BorderPadding(RasterImageViewer viewer) 
{ 
   ViewerBorderPadding b = viewer.BorderPadding; 
   string s = string.Format("Border Padding: All {0}  Left {1}  Top {2}  Right {3}  Bottom {4}", b.All, b.Left, b.Top, b.Right, b.Bottom); 
   Console.WriteLine(s); 
   Console.WriteLine("Image Dpi: (" + viewer.ImageDpiX + ", " + viewer.ImageDpiY + ")"); 
   Console.WriteLine("Image Size: " + viewer.ImageSize.Width + ", " + viewer.ImageSize.Height); 
 
   s = string.Format("LogicalViewRectangle {0}", viewer.LogicalViewRectangle); 
   Console.WriteLine(s); 
   s = string.Format("PhysicalViewRectangle {0}", viewer.PhysicalViewRectangle); 
   Console.WriteLine(s); 
 
} 

Requirements

Target Platforms

Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
Leadtools.WinForms Assembly
Click or drag to resize