Questions tagged [elementhost]

`Element Host` is a `Windows Forms control` that can be used to host a Windows Presentation Foundation (`WPF`) element.

120 questions
2
votes
1 answer

How to use input bindings for commands when WPF content is hosted in WinForms

I have Windows Forms windows with tab control and one of its tab hosts ElementHost with ContentControl as child element. This control has collection of input bindings which work only when any child element has input focus but if focus is lost they…
Demarsch
  • 1,419
  • 19
  • 39
2
votes
1 answer

WPF - C#: This element is not currently associated with any context

I have a WPF UserControl, which I use in a WinForms Control within an ElementHostControl. Then I start a WPF Window, while the Windows Form is still open. If I then close the WPF Window, and try to add a Child Element to my WPF UserControl, it…
Xuntar
  • 2,260
  • 3
  • 21
  • 31
2
votes
3 answers

Hosting WPF UserControl in a transparent Windows.Form

I need to insert my WPF USerControl into a Windows.Form. This is my control:
Nick
  • 10,309
  • 21
  • 97
  • 201
2
votes
2 answers

Black backcolor in Controls when it was set to transparent

I´m having an issue with WPF elementHost backcolors. I have a winform that loads in a panel an UserControl(Winform). In that user control I have two panels, inside of each of them, there is an elementHost that hosts a WPF usercontrol. The picture…
Andres
  • 2,729
  • 5
  • 29
  • 60
2
votes
1 answer

How to create Transparent ElementHost's in Winforms/WPF

long time lurker and self taught OOP and c# thanks in good majority to the great people here. 99% of my problems I seem to find out by searching all over the net but I'm stuck with this one. My problem is that I have a custom GUI where I'm stacking…
bassplayer142
  • 380
  • 2
  • 3
  • 15
2
votes
1 answer

How to find a WinForms control's owner form if it is nested into ElementHost?

One of our customers hosts our WinForms .NET grid control iGrid.NET (http://www.10tec.com/) inside a WPF ElementHost container together with other WPF controls. It may look strange as it's a WinForms control inside a WPF host inside a WinForms form,…
TecMan
  • 2,743
  • 2
  • 30
  • 64
2
votes
0 answers

How to add ElementHost to Datagridview Cells in C#?

I want to add ElementHost to my datagridview to bring the designed WPF control to the win form. My question is how to do this! This is my code so far: dgv.Columns[0].Name = "controls?"; ElementHost host = new…
Amir
  • 625
  • 1
  • 11
  • 26
1
vote
1 answer

Docking with ElementHost

I am attempting to add a WPF usercontrol to an existing WinForms project and get the WPF UserControl to dock and fill the entire space. There's a current framework that loads WinForms UserControls into a parent form (into a panel) in response to…
Paul Prewett
  • 2,003
  • 3
  • 23
  • 35
1
vote
2 answers

WPF Animated ProgressBar in WinForms application

I have a WinForms application, and wanted to add some nice WPF controls, one of them being an 'indeterminate' progress bar.. which just animates nicely until I tell it to stop. I have done this, and was racking my brains as to why it wasn't…
Rich S
  • 3,248
  • 3
  • 28
  • 49
1
vote
1 answer

Casting to ElementHost not possible?

I have an VSTO Outlook Add-in (a kind of winforms app) and I am using an Outlook control that allows embedding a custom winforms user control. Instead I want to embed an WPF user control so I create a Winforms user control and place within it an…
Willy
  • 9,848
  • 22
  • 141
  • 284
1
vote
1 answer

Get a list of running WPF Windows on a WinForm application

I've implemented some new WPF stuff in a old WinForm app project and I used to run it as the following: WpfWindow win = new WpfWindow(); // is a subclass of System.Windows.Window …
Mike97
  • 596
  • 5
  • 20
1
vote
2 answers

Converting WPF application to UserControl for use in WinForms application via ElementHost

I'm trying to convert this WPF application to WPF UserControl so I could use it in WinForms application via ElementHost. I'm new to WPF and have never even touched it prior to this attempt so I might be going about it completely the wrong way. I got…
dr.lijenjin
  • 317
  • 5
  • 16
1
vote
2 answers

C#,WPF integrated user control

Got a winform in project A (Main project) and which hosts a wpf user control and is maintained under different project called B On click of a button on user control ,I wanted to query server which is in project "C" and retrieve data and show it on…
Anees
  • 885
  • 4
  • 13
  • 31
1
vote
0 answers

My WPF UserControl doesn't receive input when hosted in a WinForm Form

I've added a WPF user control to a WinForms Form but I'm not able to receive events on my WPF control. I've tried to subscribe the MouseEnter event but the event handler method is never called. I'm adding the WPF control with the Visual Studio (2010…
jpsstavares
  • 3,303
  • 5
  • 25
  • 32
1
vote
1 answer

I can't move a UserControl containing full-size ElementHost in the Windows Forms designer?

I have an ElementHost in a Windows Forms UserControl that is sized to the full width/height of the Windows Forms UserControl. The UserControl is on a Form...but I can't move the UserControl or select it in the Designer, because the Child of the…
Jeff
  • 35,755
  • 15
  • 108
  • 220