Use WPF UserControl in windows forms application (c#)

1340
1
04-01-2021 05:23 AM
Nimrawi
New Contributor

I am trying to add a WPF user control in a form of a windows forms application and I have a run time issue in the user control constructor in the InitializeComponent method of MapView Control

System.Windows.Markup.XamlParseException: ''The invocation of the constructor on type 'Esri.ArcGISRuntime.UI.Controls.MapView' that matches the specified binding constraints threw an exception.' Line number '226' and line position '14'.'

Line 226 in XAML file is: <esri:MapView x:Name="MyMapView">

There is 3 inner exceptions messages

  1.  TypeInitializationException: The type initializer for 'Esri.ArcGISRuntime.UI.Controls.GeoView' threw an exception.
  2. InvalidOperationException: Could not load ArcGIS Runtime (RuntimeCoreNet100_10.dll) or one of its dependencies. Ensure "Microsoft Visual C++ 2015-2019 Redistributable" is installed.
  3. BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

Note: I am using ElementHost for the hosting process and the SDK version is 100.10.0

0 Kudos
1 Reply
Nimrawi
New Contributor

I need help to solve the problem...

0 Kudos