index > WPF Designer ("Cider") > Adorner cannot show upon WindowsFormsHost

Adorner cannot show upon WindowsFormsHost


Hi all,

I have two questions:

  1. There are two ways to display Adorner upon a WPF UIElement. One is to call AdornerLayer.GetAdornerLayer() function to get AdornerLayer for the visual element and then add a custom Adnorner to that layer. The other one is taking advantage of Cider extensibility and add an AdnornerProvider.

My problem is Adorner cannot show upon WindowsFormsHost using either of above ways. In SDK, I was told that any UIElement can have adorners on it and WindowsFormshost is of course a UIElement. Actually I find another description about WindowsFormsHost, which is this control is drawn on top of any Adorner. So I just post this topic to comfirm my understanding that WindowsFormsHost can not have any adorners on it.

If my understanding is correct, how does microsoft handle the migration issue between WinForm and WPF on Adorner case?

2. I am reading James Nakashima's article: http://blogs.msdn.com/jnak/archive/2006/04/10/572241.aspx.

Could anyone tell me where can I find the class "CustomInstanceFactory"? For I cannot find it anywhere in neither WPF and Cider assembllies.

Many thanks!

Shawn Chen

I would like to provide more details.

I am using June CTP and planning to migrate an old WinForm control to WPF. My primitive idea is to wrap the old control in WPF control with the bridge class WindowsFormsHost. Now I encountered several problems. The most difficult ones are related to Cider, since I want to present my new control in WPF style at design time instead such as Adorner. Actually I also want to know how can I migrate "Smart Tag" into Cider?

I think Microsoft is supposed to supply some migration solutions to WinForm UserControl vendors, among which WindowsFormshost and ElementHost is available. But I don't those bridge classes can solve all problems especially in Cider. I am really willing to hear the opinions from Cider team about this issue. Many thanks!

Shawn Chen

Hi Shawn,

Jim Nakashima - MSFT

First of all, many thanks to jim's reply. Basically, you had answered most of my questions.

Actually, what I want to do is to migrate my WinForm control to Cider and WPF. Now by using WindowsFormsHost, it can work well at runtime. As for design time in Cider, I find that it is nearly none support for WinForm control from MS. There are the same problems with MS's old WinForm controls. So I suspect WPF and Cider teams are working on these issues in their feature list and offer a whole migration solution for the WinForm controls.

Shawn Chen
reply 4

You can use google to search for other answers

 

More Articles

• Limitations of December CTP (Cider) release?
• Design view goes "Whoops" on my XAML code, but it will ...
• DependencyProperty registration info
• Unnecessary fractions
• Cider and other tools
• Preview version available?
• Object null/InvalidCastException
• How to apply multi Transforms to Canvas.RenderTransform?
• Cider in XAML mode by default
• Can't clear Background color
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

• Jan CTP
• Unnecessary fractions
• Moving a control on a Canvas at run time
• Design Surface in CIDER
• MouseEvents (WindowStyle"None"
• Mismatched versions of PresentationCore.
• Data binding and images
• Design-time extensions to Cider and Spar
• Button Events
• avoiding right arrow presses after enter
• Usercontrol preview
• Cancelling rendering of design
• design time features in feb. ctp
• HostingWpfUserControlInWf example crashes
• Designer not showing up

Hot Articles

• How do I connect up Events to my WPF Con
• When will Cider be available for C++ dev
• Expression Interactive Designer May 2006
• CTP's
• AutoParse Equivalent on Cider SplitView?
• Cider Designer Problem/Bug
• Warning: ZIndex attribute is not declared
• Install Issue Orcas RC1
• Design-time extensions to Cider and Spar
• Q&A: .Net Framework 3.0 JulyCTP and
• Limitations of December CTP (Cider) rele
• Where (specifically) should I ask HowTo
• More training videos/ tutorials for the
• XAML without cider?
• BitmapEffects.... What the???

Recommend Articles

• Unhandled Exception when moving mouse of
• How do I connect up Events to my WPF Con
• The project type is not supported by thi
• Is it possible to bind to resources that
• Cider type initializer error
• Drag and Drop Column Headers for a custo
• DependencyProperty registration info
• RC1 support?
• The long term goal of Cider vs.XAML
• BitmapEffects.... What the???
• Cannot download Expression Graphic Desig
• More training videos/ tutorials for the
• Design Surface in CIDER
• Where are those FAQs, etc?
• Localization Support