`Element Host` is a `Windows Forms control` that can be used to host a Windows Presentation Foundation (`WPF`) element.
Questions tagged [elementhost]
120 questions
0
votes
1 answer
ElementHost gives me "The calling thread must be STA, because many UI components require this."
I just added an ElementHost to a windows Form(There are some other c# code in the Form). Then it gave me the error "The calling thread must be STA, because many UI components require this." I changed the thread to STA, but it blocked other…

Sen
- 85
- 1
- 1
- 5
0
votes
0 answers
CLR exception STAThread attribute required for ElementHost in WinForms app
I have a WinForms VB app, using Visual Studio 2010. I am using the WPF DocumentViewer, so it is hosted by the ElementHost control. In my AppMain_Form.Designer.vb, when the follopwing (generated) statement is executed:
Me.rv_doc_vwr_host = New…

Radagast
- 1
- 1
0
votes
1 answer
Unable to find WPF User Controls in Visual Studio C# 2008; stuck with nonexistant Control instead
This is a rather unusual question but here's the issue:
I have a WPF control created in Visual Studio C# 2008, map.xaml, created in the project Remote.
I want to add this to a Windows Form, also in Remote, using the ElementHost tool. Simple,…

Myn
- 691
- 4
- 9
- 19
0
votes
0 answers
How to fix the area inside Elementhost in Windows Form?
I have integrated WPF control in Windows form using ElementHost. The WPF control contains 3D view of an obj file from 3DS Max. When the windows form is resized, the content inside the ElelmentHost displays more than the area…

AUser123
- 651
- 1
- 7
- 21
0
votes
1 answer
Adding MediaElement to windows form error C#
Hi i just recently found out that you can use components from WPF and add into windows form just by creating them and later adding then into the form as element Host
So what i am trying to do is to create a video player using MediaElement and i…

Annonymous177
- 563
- 2
- 10
- 21
0
votes
2 answers
How to show Windows Form Element Host's Message Box as Modal?
I have windows form application in C#.
I have class library for WPF user control. And I am using that in Windows Form App using Element Host. Now in WPF User control i need to show one message using MessageBox. it's working but displayed modeless on…

aru
- 413
- 4
- 14
0
votes
2 answers
Winforms host WPF control events
I'm trying to host a wpf control (gridview) on my winform.
I'm using elementHost to create the wpf control on my winform.
How do I create an event whenever I want to add rows to my wpf control?

tzush
- 1
- 2
0
votes
1 answer
mouse wheel event is not getting executed
I am trying to use canvas inside windows form and zoom and pan that canvas for that first i put element host and then put canvas inside it and then put picture box in canvas and then trying to zoom canvas i have tried various ways but event of any…

user3269550
- 452
- 4
- 15
0
votes
1 answer
How to host a WPF UserControl in ElementHost without Window with KeyPresses
I have embeded a WPF user control in a windows application using an ElementHost by setting the Child property to the custom user control.
Unfortunately, my text boxes are not receiving any input from key presses so I can't use my add-in at all.
I…

jwize
- 4,230
- 1
- 33
- 51
0
votes
1 answer
.NET Ribbon Dropdown - Can't focus on child form?
I am using .NET 4.5 with winforms. I use ElementHost in order to use XAML within my application, where the only XAML portion is the Ribbon. My application has one parent winform, hosting multiple child winforms.
When I click on any child forms…

Mike
- 235
- 3
- 15
0
votes
2 answers
Find an embedded control within WPF Application
I have a legacy application which is a mix of WPF and Windows Forms. Essentially a WPF app is loaded onto a Windows Forms Application by adding an ElementHost onto the Windows Form. This WPF application then loads a WPF user control onto it.…

Nikhil
- 3,304
- 1
- 25
- 42
0
votes
1 answer
Why am I getting "does not contain a definition for 'Map'" here?
I am trying to add a Bing Map WPF control to a Winforms app using the direction here like so:
public FormDataMapper()
{
InitializeComponent();
BingMapHostUserControl.Map.CredentialsProvider = new…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862
0
votes
1 answer
Winforms - Application get's stuck when minimized
Just recently I was using a WPF Textbox in Winforms using elementhost. I loaded a large text file with at least 100,000 + characters and over 2,000 lines. It opens the file and adds the text to the wpf textbox normally and I can easily scroll…

Zer0
- 1,002
- 1
- 19
- 40
0
votes
1 answer
WPF - FIND method for TextBox?
After using a Windows Forms RichTextBox, I realized that WPF TextBoxes do not have the .Find Method (as mentioned here). I do not wish to use a WPF RichTextBox as it causes performance issues when I host the element in Windows Forms using…

Zer0
- 1,002
- 1
- 19
- 40
0
votes
1 answer
Debugger Visualizer, ElementHost, and Edit and Continue problems
I recently wrote a custom Debugger Visualizer for Visual Studio 2008 for one of the custom types in my application. The UI for the visualizer is written in WPF and is hosted in an element host and shown using the IDialogVisualizerService…

Farnk
- 244
- 3
- 12