ArcGIS二次开发之WPF中控件的使用

WPF中ArcGIS控件的使用

  • WPF中插入ArcGIS控件
  • Winform控件上嵌套使用WPF控件

WPF中插入ArcGIS控件

在WPF中引用ArcGIS的控件需要使用WindowsFromsHost,具体用法如下:

  1. 添加引用:WindowsFormsIntegration和system.windows.form
  2. Wpf.xaml中
<WindowsFormsHost Grid.Column="0" x:Name="mapHost">
</WindowsFormsHost>
  1. 后台代码中:
public AxMapControl MapControl = new AxMapControl();
/// 
/// 控件初始化
/// 
/// 
/// 
private void Page_Loaded(object sender, RoutedEventArgs e)
{
   
    ((ISupportInitialize)MapControl)

你可能感兴趣的:(ArcGIS二次开发,wpf,c#,arcgis)