Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

WindowsFormsHost has invalid child element

Closed Thread
 
Thread Tools Display Modes
Old 05-06-2006   #1 (permalink)
Scanner2001
Guest


 

WindowsFormsHost has invalid child element

I am trying to add a .net user control to a stackpanel in a winfx
windows application. Whenever I try to add the <WindowsFormsHost> tag to the
xaml I get an error like below. The error below was generated from a simple
winfx app as shown in the msdn link
(http://windowssdk.msdn.microsoft.com...sFormsHost.asp)

I have set my references to both C:\Program Files\Microsoft Visual
Studio 8\Common7\IDE\Cider\WindowsFormsIntegration.dll and C:\Program
Files\Reference Assemblies\Microsoft\WPF\v3.0\WindowsFormsIntegration.dll.
Neither seem to work. My namespace is
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"

I have visual studio 2005 pro and february ctp release. I installed them
in the order listed.

Not sure what else to do? Any help is greatly appreciated.

Thanks,
Jeff

Error Message:
Warning 1 The element 'Grid' in namespace
'http://schemas.microsoft.com/winfx/2006/xaml/presentation' has invalid
child element 'WindowsFormsHost' in namespace
'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. List of
possible elements expected: 'Grid.ShowGridLines, Grid.ColumnDefinitions,
Grid.RowDefinitions, Grid.Background, Grid.IsItemsHost, Grid.Style,
Grid.OverridesDefaultStyle, Grid.Triggers, Grid.Resources, Grid.DataContext,
Grid.Language, Grid.Tag, Grid.InputScope, Grid.LayoutTransform, Grid.Width,
Grid.MinWidth, Grid.MaxWidth, Grid.Height, Grid.MinHeight, Grid.MaxHeight,
Grid.Margin, Grid.FocusVisualStyle, Grid.Cursor, Grid.ForceCursor,
Grid.Focusable, Grid.ToolTip, Grid.ContextMenu, Grid.InputBindings,
Grid.CommandBindings, Grid.AllowDrop, Grid.RenderSize, Grid.RenderTransform,
Grid.RenderTransformOrigin, Grid.Opacity, Grid.OpacityMask,
Grid.BitmapEffect, Grid.BitmapEffectInput, Grid.ClipToBounds, Grid.Clip,
Grid.SnapsToDevicePixels, Grid.IsEnabled, Grid.I****TestVisible,
sgUIElement, sgFrameworkElement, sgShape, Ellipse, Line, Path, Polygon,
Polyline, Rectangle, sgPanel, Canvas, DockPanel, Grid, TabPanel,
ToolBarOverflowPanel, sgStackPanel, ToolBarPanel, UniformGrid,
sgVirtualizingPanel, VirtualizingStackPanel, WrapPanel, sgControl, sgC....
C:\WindowsApplication1\WindowsApplication1\Window1.xaml 9 6
WindowsApplication1


Sample XAML:
<Window x:Class="WindowsApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
Title="WindowsApplication1" Height="300" Width="300"
>

<Grid>
<WindowsFormsHost>
<wf:MaskedTextBox x:Name="mtbDate" Mask="00/00/0000"/>
</WindowsFormsHost>
</Grid>
</Window>


Old 06-12-2006   #2 (permalink)
Patrick
Guest


 

RE: WindowsFormsHost has invalid child element

Any help would be greatly appreciated - from my side as well since I've
encountered similar problems while integrating windows forms.

Please help as it is very important for our research project!

Patrick

"Scanner2001" wrote:

> I am trying to add a .net user control to a stackpanel in a winfx
> windows application. Whenever I try to add the <WindowsFormsHost> tag to the
> xaml I get an error like below. The error below was generated from a simple
> winfx app as shown in the msdn link
> (http://windowssdk.msdn.microsoft.com...sFormsHost.asp)
>
> I have set my references to both C:\Program Files\Microsoft Visual
> Studio 8\Common7\IDE\Cider\WindowsFormsIntegration.dll and C:\Program
> Files\Reference Assemblies\Microsoft\WPF\v3.0\WindowsFormsIntegration.dll.
> Neither seem to work. My namespace is
> xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
>
> I have visual studio 2005 pro and february ctp release. I installed them
> in the order listed.
>
> Not sure what else to do? Any help is greatly appreciated.
>
> Thanks,
> Jeff
>
> Error Message:
> Warning 1 The element 'Grid' in namespace
> 'http://schemas.microsoft.com/winfx/2006/xaml/presentation' has invalid
> child element 'WindowsFormsHost' in namespace
> 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. List of
> possible elements expected: 'Grid.ShowGridLines, Grid.ColumnDefinitions,
> Grid.RowDefinitions, Grid.Background, Grid.IsItemsHost, Grid.Style,
> Grid.OverridesDefaultStyle, Grid.Triggers, Grid.Resources, Grid.DataContext,
> Grid.Language, Grid.Tag, Grid.InputScope, Grid.LayoutTransform, Grid.Width,
> Grid.MinWidth, Grid.MaxWidth, Grid.Height, Grid.MinHeight, Grid.MaxHeight,
> Grid.Margin, Grid.FocusVisualStyle, Grid.Cursor, Grid.ForceCursor,
> Grid.Focusable, Grid.ToolTip, Grid.ContextMenu, Grid.InputBindings,
> Grid.CommandBindings, Grid.AllowDrop, Grid.RenderSize, Grid.RenderTransform,
> Grid.RenderTransformOrigin, Grid.Opacity, Grid.OpacityMask,
> Grid.BitmapEffect, Grid.BitmapEffectInput, Grid.ClipToBounds, Grid.Clip,
> Grid.SnapsToDevicePixels, Grid.IsEnabled, Grid.I****TestVisible,
> sgUIElement, sgFrameworkElement, sgShape, Ellipse, Line, Path, Polygon,
> Polyline, Rectangle, sgPanel, Canvas, DockPanel, Grid, TabPanel,
> ToolBarOverflowPanel, sgStackPanel, ToolBarPanel, UniformGrid,
> sgVirtualizingPanel, VirtualizingStackPanel, WrapPanel, sgControl, sgC....
> C:\WindowsApplication1\WindowsApplication1\Window1.xaml 9 6
> WindowsApplication1
>
>
> Sample XAML:
> <Window x:Class="WindowsApplication1.Window1"
> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
> xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
> Title="WindowsApplication1" Height="300" Width="300"
> >

> <Grid>
> <WindowsFormsHost>
> <wf:MaskedTextBox x:Name="mtbDate" Mask="00/00/0000"/>
> </WindowsFormsHost>
> </Grid>
> </Window>
>
>
>

Old 07-13-2006   #3 (permalink)
Atul Bahl
Guest


 

Re: WindowsFormsHost has invalid child element (WPF crossbow)

Were you able to solve this issue as I am also having this issue.

Atul

In fact I have to use the
"Patrick" <Patrick@discussions.microsoft.com> wrote in message
news:A8E7683B-D30D-4BE4-9991-4FD0A391BDDF@microsoft.com...
> Any help would be greatly appreciated - from my side as well since I've
> encountered similar problems while integrating windows forms.
>
> Please help as it is very important for our research project!
>
> Patrick
>
> "Scanner2001" wrote:
>
>> I am trying to add a .net user control to a stackpanel in a winfx
>> windows application. Whenever I try to add the <WindowsFormsHost> tag to
>> the
>> xaml I get an error like below. The error below was generated from a
>> simple
>> winfx app as shown in the msdn link
>> (http://windowssdk.msdn.microsoft.com...sFormsHost.asp)
>>
>> I have set my references to both C:\Program Files\Microsoft Visual
>> Studio 8\Common7\IDE\Cider\WindowsFormsIntegration.dll and C:\Program
>> Files\Reference
>> Assemblies\Microsoft\WPF\v3.0\WindowsFormsIntegration.dll.
>> Neither seem to work. My namespace is
>> xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
>>
>> I have visual studio 2005 pro and february ctp release. I installed
>> them
>> in the order listed.
>>
>> Not sure what else to do? Any help is greatly appreciated.
>>
>> Thanks,
>> Jeff
>>
>> Error Message:
>> Warning 1 The element 'Grid' in namespace
>> 'http://schemas.microsoft.com/winfx/2006/xaml/presentation' has invalid
>> child element 'WindowsFormsHost' in namespace
>> 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. List of
>> possible elements expected: 'Grid.ShowGridLines, Grid.ColumnDefinitions,
>> Grid.RowDefinitions, Grid.Background, Grid.IsItemsHost, Grid.Style,
>> Grid.OverridesDefaultStyle, Grid.Triggers, Grid.Resources,
>> Grid.DataContext,
>> Grid.Language, Grid.Tag, Grid.InputScope, Grid.LayoutTransform,
>> Grid.Width,
>> Grid.MinWidth, Grid.MaxWidth, Grid.Height, Grid.MinHeight,
>> Grid.MaxHeight,
>> Grid.Margin, Grid.FocusVisualStyle, Grid.Cursor, Grid.ForceCursor,
>> Grid.Focusable, Grid.ToolTip, Grid.ContextMenu, Grid.InputBindings,
>> Grid.CommandBindings, Grid.AllowDrop, Grid.RenderSize,
>> Grid.RenderTransform,
>> Grid.RenderTransformOrigin, Grid.Opacity, Grid.OpacityMask,
>> Grid.BitmapEffect, Grid.BitmapEffectInput, Grid.ClipToBounds, Grid.Clip,
>> Grid.SnapsToDevicePixels, Grid.IsEnabled, Grid.I****TestVisible,
>> sgUIElement, sgFrameworkElement, sgShape, Ellipse, Line, Path, Polygon,
>> Polyline, Rectangle, sgPanel, Canvas, DockPanel, Grid, TabPanel,
>> ToolBarOverflowPanel, sgStackPanel, ToolBarPanel, UniformGrid,
>> sgVirtualizingPanel, VirtualizingStackPanel, WrapPanel, sgControl,
>> sgC....
>> C:\WindowsApplication1\WindowsApplication1\Window1.xaml 9 6
>> WindowsApplication1
>>
>>
>> Sample XAML:
>> <Window x:Class="WindowsApplication1.Window1"
>> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>>
>> xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
>> Title="WindowsApplication1" Height="300" Width="300"
>> >

>> <Grid>
>> <WindowsFormsHost>
>> <wf:MaskedTextBox x:Name="mtbDate" Mask="00/00/0000"/>
>> </WindowsFormsHost>
>> </Grid>
>> </Window>
>>
>>
>>



Old 01-31-2007   #4 (permalink)
Newbie


  AnayarThar is offline

same same

i hve the same problem here...
Old 01-31-2007   #5 (permalink)
Laurent Bugnion [MVP]
Guest


 

Re: WindowsFormsHost has invalid child element

Hi,

AnayarThar wrote:
> i hve the same problem here...


Because you didn't quote what you reply to, and because the original
post doesn't seem to appear in my newsreader, I have no clue what you
refer to.

Quoting is always a good idea on Usenet ;-)

Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Old 01-31-2007   #6 (permalink)
Newbie


  AnayarThar is offline

RE: WindowFormsHost has invalid child element

I have the same problem here... any help would be great...

Quote:
Atul Bahl
View Post
Were you able to solve this issue as I am also having this issue.

Atul

In fact I have to use the
"Patrick" <Patrick@discussions.microsoft.com> wrote in message
news:A8E7683B-D30D-4BE4-9991-4FD0A391BDDF@microsoft.com...
> Any help would be greatly appreciated - from my side as well since I've
> encountered similar problems while integrating windows forms.
>
> Please help as it is very important for our research project!
>
> Patrick
>
> "Scanner2001" wrote:
>
>> I am trying to add a .net user control to a stackpanel in a winfx
>> windows application. Whenever I try to add the <WindowsFormsHost> tag to
>> the
>> xaml I get an error like below. The error below was generated from a
>> simple
>> winfx app as shown in the msdn link
>> (http://windowssdk.msdn.microsoft.com...sFormsHost.asp)
>>
>> I have set my references to both C:\Program Files\Microsoft Visual
>> Studio 8\Common7\IDE\Cider\WindowsFormsIntegration.dll and C:\Program
>> Files\Reference
>> Assemblies\Microsoft\WPF\v3.0\WindowsFormsIntegration.dll.
>> Neither seem to work. My namespace is
>> xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
>>
>> I have visual studio 2005 pro and february ctp release. I installed
>> them
>> in the order listed.
>>
>> Not sure what else to do? Any help is greatly appreciated.
>>
>> Thanks,
>> Jeff
>>
>> Error Message:
>> Warning 1 The element 'Grid' in namespace
>> 'http://schemas.microsoft.com/winfx/2006/xaml/presentation' has invalid
>> child element 'WindowsFormsHost' in namespace
>> 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. List of
>> possible elements expected: 'Grid.ShowGridLines, Grid.ColumnDefinitions,
>> Grid.RowDefinitions, Grid.Background, Grid.IsItemsHost, Grid.Style,
>> Grid.OverridesDefaultStyle, Grid.Triggers, Grid.Resources,
>> Grid.DataContext,
>> Grid.Language, Grid.Tag, Grid.InputScope, Grid.LayoutTransform,
>> Grid.Width,
>> Grid.MinWidth, Grid.MaxWidth, Grid.Height, Grid.MinHeight,
>> Grid.MaxHeight,
>> Grid.Margin, Grid.FocusVisualStyle, Grid.Cursor, Grid.ForceCursor,
>> Grid.Focusable, Grid.ToolTip, Grid.ContextMenu, Grid.InputBindings,
>> Grid.CommandBindings, Grid.AllowDrop, Grid.RenderSize,
>> Grid.RenderTransform,
>> Grid.RenderTransformOrigin, Grid.Opacity, Grid.OpacityMask,
>> Grid.BitmapEffect, Grid.BitmapEffectInput, Grid.ClipToBounds, Grid.Clip,
>> Grid.SnapsToDevicePixels, Grid.IsEnabled, Grid.I****TestVisible,
>> sgUIElement, sgFrameworkElement, sgShape, Ellipse, Line, Path, Polygon,
>> Polyline, Rectangle, sgPanel, Canvas, DockPanel, Grid, TabPanel,
>> ToolBarOverflowPanel, sgStackPanel, ToolBarPanel, UniformGrid,
>> sgVirtualizingPanel, VirtualizingStackPanel, WrapPanel, sgControl,
>> sgC....
>> C:\WindowsApplication1\WindowsApplication1\Window1.xaml 9 6
>> WindowsApplication1
>>
>>
>> Sample XAML:
>> <Window x:Class="WindowsApplication1.Window1"
>> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>>
>> xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
>> Title="WindowsApplication1" Height="300" Width="300"
>> >

>> <Grid>
>> <WindowsFormsHost>
>> <wf:MaskedTextBox x:Name="mtbDate" Mask="00/00/0000"/>
>> </WindowsFormsHost>
>> </Grid>
>> </Window>
>>
>>
>>
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista + Net 3.5 + WPF + WindowsFormsHost + WebBrowser + SVG = CRASH star-italia .NET General 9 06-25-2008 10:51 PM
XAML - WindowsFormsHost : Grid has invalid child Julien De Luca Avalon 0 02-08-2007 03:56 AM
WindowsFormsHost Michael Covert Avalon 0 04-02-2006 06:29 AM
MonthCalendar in XAML using WindowsFormsHost craig kelly-soens www.xpectworld.com Avalon 0 03-27-2006 09:58 PM
Bug report: Closing a Window with a WindowsFormsHost causes excep Chris Sammis Avalon 0 02-24-2006 02:21 AM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50