I have the following XAML code that I want to perform in xaml.cs.
<RichTextBox.LayoutTransform>
<ScaleTransform ScaleX="{Binding ElementName=mySlider, Path=Value}"
ScaleY="{Binding ElementName=mySlider, Path=Value}"/>
</RichTextBox.LayoutTransform>
Basically it binds the slider to the richtextbox and performs zooming.
The following is what i have attempted:
RichTextBox newtext = new RichTextBox();
ScaleTransform mytran = new ScaleTransform();
mytran.ScaleX = mySlider.Value;
mytran.ScaleY = mySlider.Value;
newtext.LayoutTransform = mytran;
The following code behind is equivalent to the Xaml