Version

Configuring the View Zoom Level (xamRichTextEditor)

Topic Overview

Purpose

This topic explains how to set and obtain the view zoom level in the xamRichTextEditor ™ control.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic provides an overview of the features supported by the xamRichTextEditor control.

This topic explains the document’s content logical structure you can use to edit the contents in the xamRichTextEditor programmatically.

This topic provides detailed instructions to help you get up and running as quickly as possible with the xamRichTextEditor .

Zoom Level Configuration Summary

Zoom Level configuration summary chart

The following table briefly explains the configurable aspects of the xamRichTextEditor control and maps them to their specific properties.

Configurable aspect Type Properties

Sets the editor’s zoom level using the type double.

Obtains the editor’s zoom level in a value of type double.

ZoomLevel

Obtain the editor’s zoom level in percent.

Set the editor’s zoom level

Overview

Sets the editor’s zoom level using the type double between 0.2 and 4.0, with 1.0 representing 100%.

Property settings

The following table maps the desired configuration to its specific property settings.

In order to: Use this property: And set it to:

Set the editor’s zoom level

ZoomLevel

A value between 0.2 and 4.0 of type double

Example

The code snippet below demonstrates how adjust the view zoom level to 200%:

In C#:

this.xamRichTextEditor.ZoomLevel = 2.0;

In Visual Basic:

Me.xamRichTextEditor.ZoomLevel = 2.0

Obtain the editor’s zoom level

Overview

Obtains the editor’s zoom level in a value of type double.

Property settings

The following table maps the desired configuration to its specific property settings.

In order to: Use this property: And:

Obtain the editor’s zoom level

ZoomLevel

Obtain its value

Example

The code snippet below demonstrates how to obtain the view zoom level:

In C#:

double zoom = this.xamRichTextEditor.ZoomLevel;

In Visual Basic:

Dim zoom As Double = Me.xamRichTextEditor1.ZoomLevel

Obtain the editor’s zoom level as percentage

Overview

Obtain the editor’s zoom level as a percent.

Property settings

The following table maps the desired configuration to its specific property settings.

In order to: Use this property: And set it to:

Obtain the editor’s zoom level as percentage

ZoomLevel

Obtain its value

Example

The code snippet below demonstrates how to obtain the view zoom level as a percent:

In C#:

int zoomInPercents = this.xamRichTextEditor.ZoomLevelAsPercentage;

In Visual Basic:

Dim zoomInPercents As Integer = Me.xamRichTextEditor1.ZoomLevelAsPercentage

Related Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic explains how to configure several useful content editing features of the xamRichTextEditor control.

This topic explains how to change the xamRichTextEditor control’s caret color.