I have a simple WPF component that I generate and use as a plugin in a custom-made industry application. However I wish to make the WPF component be stretchable by the user in design-mode. Basically by importing the WPF component the user can then drag and drop it, but so far it is not resizeable.
Here is my code:
<base:Element x:Class="ControlForm.TEST"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:base="clr-namespace:TEST.HMI.Controls;assembly=TEST.HMI"
xmlns:dc="clr-namespace:TEST.Controls.Display;assembly=TEST.Controls.Display"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
mc:Ignorable="d"
>
<Grid Height="840" Width="890">
<StackPanel Background="White">
<TextBlock x:Name="Name1" Text="..." FontSize="14"></TextBlock>
<TextBlock x:Name="Name2" Text="..." FontSize="14"></TextBlock>
</StackPanel>
<UserControl Height="600" Width="750" Name="MyControl" Background="Black" Grid.Row="2" Grid.Column="1" >
<WindowsFormsHost Name="Host" Background="Black" Height="500" >
<dc:Display Name="Control2" ShowScrollBars="True" Enabled="true" AutoScroll="True" ShowCustomView="False" />
</WindowsFormsHost>
</UserControl>
</Grid>
</base:Element>