[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.C1ApplicationZoom.AlternativeContentSettings

AlternativeContentSettings Property

AlternativeContentSettings

Gets the settings indicating how to display zoom factor when gesture zooming.

Declaration
public AlternativeContentSettings AlternativeContentSettings { get; }
Property Value
Type Description
AlternativeContentSettings

An AlternativeContentSettings type value that indicates how to display zoom factor when gesture zooming.

Remarks

This setting only take effect when ZoomPreviewMode property value is ZoomPreviewMode.AlternativeContent.

Examples

The following code example shows how to use this property.

This code example is part of a larger example provided for the C1Zoom class.

public class GcZoomDemo : Form
{
	private ComboBox _previewModeComboBox;
	private GcZoom _gcZoom1 = new GcZoom();

	public GcZoomDemo()
	{
		InitializeComponent();

		_gcZoom1.Target = this;

		_previewModeComboBox.SelectedIndexChanged += previewModeComboBox_SelectedIndexChanged;
	}

	void previewModeComboBox_SelectedIndexChanged(object sender, EventArgs e)
	{
		switch (_previewModeComboBox.Text)
		{
			case "Bitmap":
				_gcZoom1.ZoomPreviewMode = ZoomPreviewMode.Bitmap;
				break;

			case "AlternativeContent":
				_gcZoom1.ZoomPreviewMode = ZoomPreviewMode.AlternativeContent;
				_gcZoom1.AlternativeContentSettings.ForeColor = SystemColors.ControlDarkDark;
				_gcZoom1.AlternativeContentSettings.Format = "Zooming {Percentage}%";
				break;

			case "NoPreview":
				_gcZoom1.ZoomPreviewMode = ZoomPreviewMode.NoPreview;
				break;

			default:
				break;
		}
	}

	private void InitializeComponent()
	{
		_previewModeComboBox = new ComboBox();
		_previewModeComboBox.Items.AddRange(new object[] { "Bitmap", "AlternativeContent", "NoPreview" });
		this.Controls.Add(_previewModeComboBox);
	}
}
Public Class GcZoomDemo
	Inherits Form
	Private _previewModeComboBox As ComboBox
	Private _gcZoom1 As New GcZoom()

	Public Sub New()
		InitializeComponent()

		_gcZoom1.Target = Me

		AddHandler _previewModeComboBox.SelectedIndexChanged, AddressOf previewModeComboBox_SelectedIndexChanged
	End Sub

	Private Sub previewModeComboBox_SelectedIndexChanged(sender As Object, e As EventArgs)
		Select Case _previewModeComboBox.Text
			Case "Bitmap"
				_gcZoom1.ZoomPreviewMode = ZoomPreviewMode.Bitmap
				Exit Select

			Case "AlternativeContent"
				_gcZoom1.ZoomPreviewMode = ZoomPreviewMode.AlternativeContent
				_gcZoom1.AlternativeContentSettings.ForeColor = SystemColors.ControlDarkDark
				_gcZoom1.AlternativeContentSettings.Format = "Zooming {Percentage}%"
				Exit Select

			Case "NoPreview"
				_gcZoom1.ZoomPreviewMode = ZoomPreviewMode.NoPreview
				Exit Select

			Case Else
				Exit Select
		End Select
	End Sub

	Private Sub InitializeComponent()
		_previewModeComboBox = New ComboBox()
		_previewModeComboBox.Items.AddRange(New Object() {"Bitmap", "AlternativeContent", "NoPreview"})
		Me.Controls.Add(_previewModeComboBox)
	End Sub
 End Class