ZoomFactor Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Gets or sets the zoom factor, in percent, for a Text Control.
Syntax
public int ZoomFactor { get; set; }Public Property ZoomFactor As IntegerExamples
The following XAML example shows how to Bind the ZoomFactor property to a slider using the WPF.LogarithmicConverter.
…
xmlns:tx="clr-namespace:TXTextControl.WPF;assembly=TXTextControl.WPF"
…
<Window.Resources>
<tx:LogarithmicConverter
x:Key="logConv"
InputMinimum="10"
InputCenter="100"
InputMaximum="400"
OutputMinimum="0"
OutputMaximum="100" />
</Window.Resources>
…
<Slider
Minimum="0"
Maximum="100"
Value="{Binding ElementName=textControl1, Path=ZoomFactor, Converter={StaticResource logConv}}" />The following example uses TextControl.ZoomFactor to set a comfortable document zoom level. The change is then applied to the active document or user interface.
textControl.ZoomFactor = 125;
textControl.Update();textControl.ZoomFactor = 125
textControl.Update()Limitations
The zoom factor must be between 10 and ushort.MaxValue percent, when the TextControl.ViewMode property has been set to PageView or Normal. For the other modes the zoom factor must be between 10 and 400 percent.