![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | place net 2.0 control on xaml form Hello, is it possible to place an "old" .Net 2.0 custom control on a wpf form? How? They do not appear in the VS toolbox... thanks! Dirk |
My System Specs![]() |
| | #2 (permalink) |
| | Re: place net 2.0 control on xaml form I don't think so. They are completely different types of controls. Robin S. ------------------- "Dirk Reske" <_Dirk.Reske@gmx.net> wrote in message news:eHMG8UUUHHA.1200@TK2MSFTNGP04.phx.gbl... > Hello, > > is it possible to place an "old" .Net 2.0 custom control on a wpf form? > How? They do not appear in the VS toolbox... > > thanks! > Dirk > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: place net 2.0 control on xaml form Hi Dirk Yes you can! See the SDK Samples. C:\Programme\Microsoft SDKs\Windows\v6.0\Samples\WPFSamples\MigrationInterop\WpfHostingWindowsFormsControl To design Windows use MS Expression Blend: http://www.microsoft.com/products/ex...blend/try.mspx "WPF and Windows Forms are 2 very different technologies although there is some interoperability available through WindowsFormsHost. Cider will not be supporting IComponent, only the Windows Forms designer will support that." Thats the reason, why Blend don't show Controls inside the WindowsFormsHost and why the designer in VS2005 is not realy handy. Best regards Horst |
My System Specs![]() |
| | #4 (permalink) |
| | Re: place net 2.0 control on xaml form Hello, when I add ?<?Mapping XmlNamespace="wfi" ClrNamespace="System.Windows.Forms.Integration" Assembly="WindowsFormsIntegration"?> <UserControl x:Class="VMessAX.MainForm" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wfi="wfi" xmlns:dh="dh" Height="273" Width="158"> <Grid> <wfi:WindowsFormsHost> </wfi:WindowsFormsHost> </Grid> </UserControl> I get the messages that the tag WindowsFormsHost is not existing in namespace wfi.... "Horst Klein" <horst.klein@vitodata.ch> schrieb im Newsbeitrag news:%23Fn24pbUHHA.1364@TK2MSFTNGP06.phx.gbl... > Hi Dirk > > Yes you can! > See the SDK Samples. > C:\Programme\Microsoft > SDKs\Windows\v6.0\Samples\WPFSamples\MigrationInterop\WpfHostingWindowsFormsControl > > > To design Windows use MS Expression Blend: > http://www.microsoft.com/products/ex...blend/try.mspx > > "WPF and Windows Forms are 2 very different technologies although there is > some interoperability available through WindowsFormsHost. Cider will not > be > supporting IComponent, only the Windows Forms designer will support that." > > Thats the reason, why Blend don't show Controls inside the > WindowsFormsHost > and why the designer in VS2005 is not realy handy. > > Best regards > Horst > > > > > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: place net 2.0 control on xaml form Hi Dirk Try this: <Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:WinForms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration" Title="MyWindowsFormHostSample" Height="300" Width="300"> <Grid> <Button Name="Button1" Height="50" Margin="0,0,0,20" Content="WPF Button"/> <wfi:WindowsFormsHost Name="WinFormsHost" Height="50" Margin="0,100,0,0" Background="Yellow"> <WinForms:Button Name="MyWinFormButton" Text="Forms Button" Height="50"/> </wfi:WindowsFormsHost> </Grid> </Window> Best regards Horst |
My System Specs![]() |
| | #6 (permalink) |
| | Re: place net 2.0 control on xaml form Hi, RobinS wrote: > I don't think so. They are completely different types of controls. Only as different as, for example, an ActiveX control is from an HTML placeholder :-) Integration is the key, and WindowsFormsHost is the answer... > > Robin S. > ------------------- > "Dirk Reske" <_Dirk.Reske@gmx.net> wrote in message > news:eHMG8UUUHHA.1200@TK2MSFTNGP04.phx.gbl... >> Hello, >> >> is it possible to place an "old" .Net 2.0 custom control on a wpf form? >> How? They do not appear in the VS toolbox... >> >> thanks! >> Dirk Greetings, Laurent -- Laurent Bugnion [MVP ASP.NET] Software engineering, Blog: http://www.galasoft-LB.ch PhotoAlbum: http://www.galasoft-LB.ch/pictures Support children in Calcutta: http://www.calcutta-espoir.ch |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| User Control -> disappear when form.Click | .NET General | |||