Questions tagged [elementhost]

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

120 questions
1
vote
1 answer

WPF Popup, hosted in Winforms using ElementHost is freezed when SaveFileDialog is opened

I have the below code in a usercontrol.
user1874589
  • 117
  • 1
  • 2
  • 9
1
vote
1 answer

WPF TabControl borders not rendering properly in MMC snap-in

I am hosting a WPF TabControl inside of a Windows Form that is part of an MMC snap-in. Everything looks fine on Windows 8.1: But I have an issue in Windows Server 2012 R2: From above, you can see that it increases the border of my TabControl.…
Alexandru
  • 12,264
  • 17
  • 113
  • 208
1
vote
2 answers

using font file in wpf usercontrol

I am using a WPF UserControl inside a Winforms form. I have it working. I would like the text that I use in the WPF UserControl to use a font that I have as a TTF. I do not know how to reference this TTF and have the control use it. I am…
Jeff
  • 2,061
  • 4
  • 27
  • 45
1
vote
1 answer

How to use a windows forms embedded resource as the Source for a WPF mediaelement?

I am hosting a MediaElement in a WinForms application, which I would like to play both images and video through. My images and video are set as embedded resources to the application. The MediaElement.Source property only accepts a URI. Any ideas…
Boo
  • 11
  • 1
1
vote
3 answers

Black background before loading a wpf controll when using ElementHost

I'm using WPF in WinForms with ElementHost. When the form loads, there is a flash of black background where the ElementHost is about to load. This looks kind of bad. Any suggestions on how to get rid of this?
jostyposty
  • 133
  • 2
  • 14
1
vote
1 answer

Unable to step into debug mode into WPF control from Windows Form

I am using ElementHost Control to embed a custom WPF control that I have created into a windows from application. Earlier I was able to debug the WPF control by pressing the F11 button when the control was created: MyControl.UserControl1 obj = new…
Anshuman Jasrotia
  • 3,135
  • 8
  • 48
  • 81
1
vote
0 answers

The Elementhost and the Popup

I got a problem with the Windows.Forms.ElementHost. Within the host I placed a WPF UserControl, in which I got a Popup. Some Code:
Robert Nagel
  • 149
  • 14
0
votes
1 answer

Element host doesn't resize child properly

I'm hosting a WPF control in WinForms using the elementHost control. When I try to resize the elementHost (in height) any further then the orignal position, the child control inside is centered and black borders appear around it. When I try to…
cat
  • 530
  • 2
  • 7
  • 16
0
votes
1 answer

WPF control hosted in an ElementHost control changes colour

I'm creating a WPF 'Button' control and making it the child of my ElementHost control. The background of the button is set to Red. When I run my project, the button changes colour and it seems to loop through every couple of seconds going from Red…
Rich S
  • 3,248
  • 3
  • 28
  • 49
0
votes
1 answer

Can't data-bind to ComboBox in WPF control for WinForms app; designer works fine

I have a WPF user control that sits in an ElementHost so it can be used in a WinForms app. On this WPF user control is a ComboBox, to which I'm trying to data-bind an ObservableCollection of a rather simple custom class. This ObservableCollection…
Eric Eggers
  • 93
  • 1
  • 11
0
votes
0 answers

Video rendering issue in WPF when moving window between monitors with different screen resolution and/or scale

I have a winforms application (well, it is an VSTO Outlook Add-in that runs within Outlook) in which I am using a toolbar and within this toolbar I embed a WPF user controls through the use of an ElementHost container. My application fits well for…
Willy
  • 9,848
  • 22
  • 141
  • 284
0
votes
0 answers

Winforms Control.ScaleControl method not fired when changing scale from OS on the fly without restartig winforms application

I have a kind of winforms applications, an VSTO Outlook addin. Within this application I am using a container that Outlook API provides and in this container you can embbed a Winforms usercontrol. So now i want to use a WPF usercontrol in this…
Willy
  • 9,848
  • 22
  • 141
  • 284
0
votes
0 answers

ElementHost does not resize appropriately to its content

I have an ElementHost which contains an WPF user control. For some reason that I don't know, the ElementHost is not being resized to the user control when it changes its height. My ElementHost has the property AutoSize set to True and the Dock…
Willy
  • 9,848
  • 22
  • 141
  • 284
0
votes
2 answers

Getting the parent window from the most inner WPF usercontrol

I have an WPF User control, let's say UCInner, which contains a WPF Popup. UCInner is used in another WPF user control, let's say UCOuter. UCOuter is embedded in an ElementHost (ElementHost.Child = UCOuter). Finally UCOuter is embedded within an…
Willy
  • 9,848
  • 22
  • 141
  • 284
0
votes
0 answers

How can I successfully change WinForms hosted WPF RichTextBox Document Width? Document Width does not increase and wraps all text on reaching width

I am using ElementHost to host WPF RichTextBox on my Windows Forms Form. The ElementHost fills the entire Panel by DockStyle.Fill. The problem is that WPF RichTextBox doesn't change it's Document's width when I try to change it using…
Tushar
  • 13
  • 4