[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.C1ApplicationZoom.BackgroundImageLayout

BackgroundImageLayout Property

BackgroundImageLayout

Gets or sets the background image layout as defined in the ImageLayout enumeration.

Declaration
public ImageLayout BackgroundImageLayout { get; set; }
Property Value
Type Description
ImageLayout

One of the values of ImageLayout (Center , None, Stretch, Tile, or Zoom). Tile is the default value.

Remarks

Use the BackgroundImageLayout property to specify the position and behavior of an image you have placed onto the blank areas of Form when to zoom and scroll. BackgroundImageLayout takes effect only if the BackgroundImage property is set.

Examples

The following code example shows how to use this property.

This code example is part of a larger example provided for the BackColor property.

public class GcZoomBackColorDemo : Form
{
	private Button _backImageButton;
	private GcZoom _gcZoom1 = new GcZoom();

	public GcZoomBackColorDemo()
	{
		InitializeComponent();

		_gcZoom1.Target = this;

		_backImageButton.Click += _backImageButton_Click;
	}

	void _backImageButton_Click(object sender, EventArgs e)
	{
		this._gcZoom1.BackgroundImage = Image.FromFile(@"c:\backimage.jpg");
		this._gcZoom1.BackgroundImageLayout = ImageLayout.Stretch;
	}

	private void InitializeComponent()
	{
		_backImageButton = new Button();
		_backImageButton.Text = "BackImage";
		_backImageButton.Location = new Point(20, 50);
		_backImageButton.Size = new Size(120, 25);
		this.Controls.Add(_backImageButton);
	}
}
Public Class GcZoomBackColorDemo
	Inherits Form
	Private _backImageButton As Button
	Private _gcZoom1 As New GcZoom()

	Public Sub New()
		InitializeComponent()

		_gcZoom1.Target = Me

		AddHandler _backImageButton.Click, AddressOf _backImageButton_Click
	End Sub

	Private Sub _backImageButton_Click(sender As Object, e As EventArgs)
		Me._gcZoom1.BackgroundImage = Image.FromFile("c:\backimage.jpg")
		Me._gcZoom1.BackgroundImageLayout = ImageLayout.Stretch
	End Sub

	Private Sub InitializeComponent()
		_backImageButton = New Button()
		_backImageButton.Text = "BackImage"
		_backImageButton.Location = New Point(20, 50)
		_backImageButton.Size = New Size(120, 25)
		Me.Controls.Add(_backImageButton)
	End Sub
End Class