.NET Framework - Include ActiveX control in Blend

Asked By Matte
27-Jul-07 04:20 AM
I've to include my own ActiveX ocntrol inside expression blend. Does it exist
a "visual" way or i have to write XAML directly? in this case, can someone
suggest a reference to do it..... i'm using xaml since last week!)

thanks in advance.

Matteo
Visual Studio 2005
(1)
Compact Framework
(1)
WPFAxControlLibrary
(1)
XAML
(1)
WPF
(1)
VB
(1)
WPFWrapper
(1)
WindowsFormsHost
(1)
  BenHoffma replied...
27-Jul-07 08:58 PM
With some doing (depending on the ActiveX control & its licensing) you can
wrap an ActiveX control in a WindowsForms UserControl and then easily use the
WPF WindowsFormsHost to host the WindowsForms control inside a WPF
UserControl. At that point you just add the reference (to the assembly with
the WPF control) to your project in Blend and you can grab your new control
from the 'Custom Controls' tab in the Asset Library in Blend and drag it onto
the design surface. Unfortunately, the wrapped ActiveX controls don't behave
well in Blend (just graphically - they overlap the project view on the right
and the asset panel on the left as your resize / scroll your design surface.)
Its a wrapper-on-a-wrapper solution but it works. I will post more details if
you would like (maye a sample project or something).



--
Ben Hoffman
www.benhoffman.us
  MatthiasKliefot replied...
30-Jul-07 04:12 AM
Hello Ben,

can you post details of this method? How can I wrap an ActiveX control (my
Control is written in VC++) in a UserControl (is it a UserControl created
with VC++ or with Compact Framework). I need my Control as a visible Control
in a VB-Form (PPC).

I use Visual Studio 2005.

Thanks for all replies
Matthias Kliefoth
  BenHoffma replied...
30-Jul-07 09:52 PM
Hi Matthias,

Check out:

http://www.benhoffman.us/default.asp?Display=8

for more information.

--
Ben Hoffman
http://www.benhoffman.us
  Matte replied...
31-Jul-07 04:54 AM
Hi Ben,
i tried to reply your example:
1 - open an empty WPF custom control library (named "WPFAxControlLibrary")
2 - add a windows user control and drag inside a windows media player ax
( putting its dock style to "fill")
3 - Add reference to WindowsFormIntegration; visual studio add reference to
4 - inside the UserControl1.xaml (the default uc found inside the empty
project) i typed the aliases for clr namespace:

THIS IS OK:
xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"

BUT THIS:
xmlns:code="clr-namespace:WPFAxControlLibrary"
PRODUCE THE ERROR:
Assembly '' was not found. The 'clr-namespace' URI refers to an assembly
that is not referenced by the project.

I'm sure that "WPFAxControlLibrary" is the correct namespace for my uc. This
should be the same thing of "WPFWrapper" in your example.....

thanks for the help

Matteo
  Matte replied...
31-Jul-07 05:06 AM
The same thing was appen with your example code, if i add clr-eference to the
namespace WPFWrapper the xaml designer disappear and cannot see the window
preview......
  BenHoffma replied...
31-Jul-07 10:00 AM
You will need to either build the ActiveX control library with VB6 (the build
process registers it on the machine) or register it yourself (using the old
RegSvr32 - oh...the joys of ActiveX) to get VS2005 to find it in the
WPFWrapper project.

Also, I don't see the graphical preview in VS2005 either (I see 'Whoops!'),
which, I think, is due to the XAML Editor for VS2005 (Cider - right?) still
being beta - it is probably better with Orcas Beta2 (which is out now). I see
the following 'errors' in VS2005:

-Assembly '' was not found. The 'clr-namespace' URI refers to an assembly
that is not referenced by the project.
-The type 'code:WindowsFormsWrapper' was not found. Verify that you are not
missing an assembly reference.

However, it still builds & works fine - go figure.

If you'd like, we can work out your specific issues offline. As for
interoping to Media Player, you might look at using WPF's native support for
multimedia. You can add multimedia content very simply in Blend using the
MediaElement. For more advanced features, check out the Video Shelf Sample in
the August 2007 Blend 2 Preview.

Here's a sample video player created with Blend, I think you can get the
sample code there too.

http://www.blendtips.com/?q=node/12


--
Ben Hoffman
http://www.benhoffman.us
  Matte replied...
01-Aug-07 02:38 AM
Thanks a lot ben,
as you tell me, the probem is related to the beta version of 'cider', in the
last version of vs 2005 extension the reference to local assemblies have some
problem ( and also the design preview ), however it can be build and working
fine at run time (as you say)
I'll try with the beta 2 of vs 2008 and hope to solve those problems. thanks

Matteo
Create New Account
help
Problem with the Manifest Tool executable? .NET Framework error PRJ0002 : Error result -1073741819 returned from 'C: \ Program Files \ Microsoft Visual Studio 8 \ VC \ bin \ mt.exe'. The above error occurs when I attempt to build the Release configuration of my VC++2005 Win 32 DLL. The DEBUG release compiles and builds without any errors. This error appears I have found suggest that it is an error that relates to BETA versions of Visual Studio but I have never had any Betas installed. I do, however, have a full copy of Visual Studio 6 installed on my development machine as well as VS2005. Settings that apply to my
Missing ADO.NET Entity Framework .NET Framework I am missing the project template to create an Entity Framework project. I can right click and add an ADO.NET Entity Data Model to an that is not what I need. I have tried re-installing Service Pack 1 for Visual Studio 2008. I am really hoping that I will not have to to a un-install of Visual Studio. I am running Windows XP Version 5.1.2600 Service Pack 3 Build 2600 Just in-case it is helpful, I am pasting the info from my Visual Studio about window below * ** ** **ABOUT INFO* ** ** * Microsoft Visual Studio 2008 Version 9.0.30729.1
SOAP client Error says Path property must be set before calling the Send method ? .NET Framework Hi, I am trying to run a page that is in C#.Net. I have me resolve this error. Regards Boney Thomas From http: / / www.developmentnow.com / g / 16_0_0_0_0_0 / dotnet-framework-aspnet-webservices.htm Posted via DevelopmentNow.com Groups http: / / www.developmentnow.com / g / ASP.NET Services Discussions NOVAS.NCOMPARE.V5.2.R12.for.LINUX (1) NASSDA.CRITIC.v5.0.01.2005.WINDOWS (1) GREEN.HILLS.Integrity.v5.0.6.RTOS.for.Blackfin (1) NASSDA.HANEX.v5.0.01.2005.WINDOWS (1) OPTIS.OPTISWORKS.STUDIO.v2008 (1) NASSDA.HSIM.v5.0.01 2005.WINDOWS (1) 2012 crack software5 download. Please press Ctrl+F to find your cracked software v12.52 Sonnet.Suite.Pro.v12.52.Linux Sono.Scope.v2.8. Sony.Acid.Music.Studio.v7.0a. Sony.Sound.Forge.10.0a. sony.vegas.7.0c sound.soap.1.1 v1.4.371b SourcePublisher.for.C.Plus.Plus.v1.4.371b Space.Management.for.CADVance.2005 SPACE-4.0.rar. SpaceCAD.v3.1.0.320.WinALL SpaceClaim.v2009.Plus.SP2.x64
cmd.exe .NET Framework Hallo, vielleicht weiß ja jemand einen Rat, seit heute gibt es ständig Abstürze bzw. Fehlermeldungen www.kahnsoft.de / error.jpg Danke für Hinweise im Vorraus, grüße Karsten Schulz (VersionsHistoryDump :) Microsoft Visual Studio 2008 Version 9.0.30428.1 SP1Beta1 Microsoft .NET Framework Version 3.5 SP1 Installed Edition: Enterprise Microsoft Visual Basic 2008 91899-270-0320045-60060 Microsoft Visual Basic 2008 Microsoft Visual C# 2008 91899-270-0320045-60060 Microsoft Visual C# 2008 Microsoft Visual C++ 2008 91899-270-0320045-60060 Microsoft Visual C++ 2008 Microsoft
VS2008 SP1 :: Cannot display project properties any more .NET Framework Hi, i have a problem with Visual Studio 2008 SP1. I cannot display the Neither c# projects, nor VB.NET Projects. I tried and New dnstall. Does anyone had this problem too? Greetings Gordian ~~~~~~~~~~~~~ I have the following Visual Studio Products installed: Microsoft Visual Studio 2008 Version 9.0.30729.1 SP Microsoft .NET Framework Version 3.5 SP1 Installed Edition: Professional Microsoft Visual Basic 2008 91605-270-0034223-60570