Questions tagged [elementhost]

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

120 questions
4
votes
1 answer

WinForms ElementHost Error

I am building a set of WPF controls on the side of my WinForms application so that I can convert the entire project over to WPF eventually. I am using the WinForms ElementHost module and setting my WPF controls inside of it. Here is my issue, I am…
Steven Combs
  • 1,890
  • 6
  • 29
  • 54
4
votes
1 answer

Bubble mouse event from WPF to WinForms

I have WPF control hosted inside a WinForms control using ElementHost. The WinForms control has a context menu. I want to show the context menu when user right click on the WPF control. How can this be done? It seems mouse event is not bubbled from…
Chris
  • 357
  • 4
  • 16
4
votes
1 answer

Any disadvantage to using an ElementHost to host a WPF UserControl in a Winform application?

Curious if there are any disadvantages to using an ElementHost to host a WPF UserControl in a Winform application? I ask because in general I feel that it takes to much time for me create a new WPF application with a basic interface that looks…
Cory Charlton
  • 8,868
  • 4
  • 48
  • 68
4
votes
1 answer

Strange focus issue with UserControl hosted in ElementHost

I have UserControl which is hoseted in ElementHost. It contains DataGrid When user presses enter or double clicks the row new window is shown (modalless), and when that window is closed window with ElementHost is activated back. The problem is that…
Pavel Voronin
  • 13,503
  • 7
  • 71
  • 137
4
votes
1 answer

WPF element hosted in ElementHost not redrawing correctly

I'm writing a program to implement COM component in C#. This component provides a UI component too. In the interest of making it easy to implement future additions to the component, I decided to write the UI in Xaml using WPF and wrapping it in an…
Tym Lipari
  • 41
  • 1
4
votes
5 answers

Resize Form based on ElementHost size

I have a Form(winform) and it contains Elementhost. During run time, i am hosting my WPF Usercontrols to this elementhost. I have used AutoSize = True for elementhost. Elementhost resizes itself basedon WPF Usercontrol size. But How to resize my…
Harsha
  • 1,861
  • 7
  • 28
  • 56
3
votes
0 answers

Visual Studio restarts when having 2 elementHosts

I have a usercontrol with 2 elementHosts whithin it. I set the elementHosts' Child property programmatically in Load() event. The problem is, when I try to add that user control to a form, Visual Studio restarts and I have no idea how to overcome…
3
votes
2 answers

Keyboard Focus navigation problem with ElementHost hosted WPF view with WindowsFormsHost hosted controls

I have a keyboard focus problem with Windows Forms application that hosts WPF UserControls. When I press tab, the navigation works well if there are only WPF controls in the UserControl. If I add a WindowsFormsHost hosted control to this WPF…
Trainee
  • 41
  • 1
  • 4
3
votes
1 answer

Binding to a WPF hosted control's DependencyProperty in WinForms

I have a WinForms app with some elements that are hosted WPF user controls (using ElementHost). I want to be able to bind my WinForm's control property (Button.Enabled) to a custom DependencyProperty of the hosted WPF user control…
Reddog
  • 15,219
  • 3
  • 51
  • 63
2
votes
1 answer

Hide wpf popup when click on a Winform control

I have an ElementHost object in a WinForm dialog. This elementhosts child is a Popup. I want to hide or close the Popup when the user clicks anywhere. I can do it when the click happened in the Popup. How to close it when the user clicks outside…
Miklós Balogh
  • 2,164
  • 2
  • 19
  • 26
2
votes
2 answers

ElementHost Layout Problems

I have a bunch of ElementHosts that I'm loading onto my form. When this happens, the element hosts all appear with a black background. If I bring another control to front, then close the other control, the ElementHosts are repainted normally. After…
Jeff
  • 35,755
  • 15
  • 108
  • 220
2
votes
1 answer

WPF - Configure custom event to trigger begin storyboard on user control

I hope someone is able to assist here, either to advise how to fix what I have or to suggest a better way of achieving what I'm after. I have a simple custom control on which I want to be able to start/stop/pause/resume an opacity animation. I've…
lukep
  • 111
  • 10
2
votes
1 answer

Unable to fill entire space with WPF control in WinForm

I created Wpf UserControl and am hosting it in WinForm.
Leon Havin
  • 177
  • 2
  • 14
2
votes
1 answer

ElementHost blocks mouse events

NOTE: I AM TRYING TO SOLVE THE MOUSE ISSUE, NOT THE KEYBOARD PROBLEM, WHICH IS ALREADY SOLVED So I am creating a Visual Studio 2015 extension, working on the Options pages. I am using WPF, so I use ElementHost to host a UserControl. At first it…
2
votes
1 answer

C# Windows Forms: Drop a picture into a WPF RichTextBox (in ElementHost)

I have a c# Windows Forms project with a WPF RichTextBox (in ElementHost) on the form and want to drag&drop a picture from the explorer (Windows 7 x64) into it, but the cursor shows only the not-allowed-symbol. This is my code: private void…
PhazBlue
  • 79
  • 8