WinForms support problem [Version 1.3]

Feb 4, 2011 at 2:14 PM
Edited Feb 4, 2011 at 2:17 PM

First, thank you for this wonderful library!

It´s exactly what i needed. But i´ve a problem with a DocumentContent which hosts WinForms Controls.

If the Application is resized by the user, so that the DocumentPane is smaller than the minimal size of the WinForms Control, the WinForms Control is visible outside the pane and overlaps with other panes on the right and on the bottom.

Here is the code of my DocumentContent to test the WinForms support:

 

<ad:DocumentContent x:Class="ADTest.WinFormDocument"
             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:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
             xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
        <StackPanel>
        <StackPanel Orientation="Horizontal">
            <Label Margin="10" >WinFormTextBox:</Label>
            <WindowsFormsHost Margin="10" HorizontalAlignment="Center" Width="150">
                <wf:MaskedTextBox x:Name="mtbDate" Mask="00/00/0000" />
            </WindowsFormsHost>
        </StackPanel>
            <Button Content="Button" Height="23" Name="button1" Width="75" />
        </StackPanel>
        </ScrollViewer>
    </Grid>
</ad:DocumentContent>

 

WinForms control support is very important for my needs because i´ve to use a special WinForms control of our company.

Because of performance issues we can´t realize this control as WPF control.

Thanks,

Andy