Scaling WPF elements from WinForms

---
Scale1 Example: step-by-step

Project, right click, add, new Item
In treeview select 'WPF, rename 'UserControl1.xaml' to 'WPF_Part.xaml', press OK
Some references are added and the WPF_Part design page appears
Right-click on Project, choose Build
On Form1.vb[Design] - Toolbox , select 'WPF Interoperability/ ElementHost' and drag it to the Form
Adjust Location and size of the Element Host and set Anchor to 'Top, Bottom, Left, Right'
In 'Element Host Tasks' 'select Hosted Child' choose 'WPF_Part' in the drop-down list (or use the child property to do the same)
In Form1.vb insert:
Public WPF_Scale As New Windows.Media.ScaleTransform(1.0, 1.0)
Drag a TrackBar to Form1, set properties:
	Anchor: left, bottom
	Minimum: 5
	Maximum: 120
	Value: 10
	TickFrequency: 5
Double click 'TrackBar1' Event 'ValueChanged' -> code for Event handler will be created 
In the Handler sub insert:
	WPF_Scale.ScaleX=TrackBar1.Value /10      
WPF_Scale.ScaleY = TrackBar1.Value / 10

In WPF_Part.xaml select 'Grid', drag 'Textbox' from the Toolbox to it
Move the Textbox to the upper left of the Grid until Margin 10,10
In the Properties set Name of the Textbox to 'Textbox1'
Set Layout/HorizontalAlignment and Layout/VerticalAlignment to stretch and
Layout/Width and Layout/Height to Auto
Search for 'VerticalScrollBarVisibility' and set it to 'Auto'
Search for 'AccepsReturn' and check it
Now the XAML-Part should look like this:
<Grid>
<TextBox x:Name="Textbox1" Margin="10,10,0,0" TextWrapping="Wrap" Text="TextBox" VerticalScrollBarVisibility="Auto" AcceptsReturn="True"/>
 </Grid>
In XAML select 'UserControl', go to Properties, click on the Events Button, scroll down to 'Loaded' and double-click on the empty box.  -> code for Event handler will be created
In the Handler-sub insert:
TextBox1.LayoutTransform = Form1.WPF_Scale

Now the project can be started and dragging Trackbar1 scales the WPF-Textbox.

---
Scale 2
	A bit more WPF. A nice rounded border, background color and a label with text.
There is a ScrollViewer around the Textbox and the Textbox VerticalScrollBarVisibility remains 'hidden'.
Text can easily exchanged between WinForms and the WPF textbox. 

---
Scale 3
The WPF elements are stretched/shrinked to the maximum available size, with keeping the aspect ratio. An alternative way, with some limitations, would be a WPF-Viewbox.

