ArcGIS Pro 2.8 API Reference Guide
EmbeddableControl Property
Example 

ArcGIS.Desktop.Mapping Namespace > MapTool Class : EmbeddableControl Property
Gets the EmbeddableControl created for the tool. This is the control set by the ControlID property.
Syntax
protected EmbeddableControl EmbeddableControl {get;}
Protected ReadOnly Property EmbeddableControl As EmbeddableControl
Remarks
In some cases you may need to provide a dock pane to configure the behavior of the tool while in use similar to many of the editing tools. This property returns the instance of the EmbeddableControl set by the ControlID. property. If you close the dock pane the tool will be deactivated and if you activate a different tool the dock pane will close.
Example
Set the embeddable control for a MapTool.
internal class MapTool_WithControl : MapTool
{
  public MapTool_WithControl()
  {
    ControlID = "mapTool_EmbeddableControl";
  }

  protected override void OnToolMouseDown(MapViewMouseButtonEventArgs e)
  {
    e.Handled = true;
  }

  protected override Task HandleMouseDownAsync(MapViewMouseButtonEventArgs e)
  {
    //Get the instance of the ViewModel
    var vm = EmbeddableControl as EmbeddedControlViewModel;
    if (vm == null)
      return Task.FromResult(0);

    //Get the map coordinates from the click point and set the property on the ViewMode.
    return QueuedTask.Run(() =>
      {
        var mapPoint = MapView.Active.ClientToMap(e.ClientPoint);
        vm.ClickText = string.Format("X: {0}, Y: {1}, Z: {2}", mapPoint.X, mapPoint.Y, mapPoint.Z);
      });
  }
}
<!--

   Copyright 2018 Esri

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

   See the License for the specific language governing permissions and
   limitations under the License.

-->
<UserControl x:Class="Examples.EmbeddedControlView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"                                             
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <TextBlock Text="{Binding ClickText}" HorizontalAlignment="Center"/>
    </Grid>
</UserControl>
/*

   Copyright 2018 Esri

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

   See the License for the specific language governing permissions and
   limitations under the License.

*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ArcGIS.Desktop.Framework;
using ArcGIS.Desktop.Framework.Contracts;
using ArcGIS.Desktop.Framework.Controls;
using System.Xml.Linq;

namespace Examples
{
  /// <summary>
  /// Derive from ArcGIS.Desktop.Framework.Controls.EmbeddableControl
  /// </summary>
  internal class EmbeddedControlViewModel : EmbeddableControl
  {
    public EmbeddedControlViewModel(XElement options, bool canChangeOptions) : base(options, canChangeOptions)
    {
    }

    private string _clickText = "Click in view to show coordinates";
    public string ClickText
    {
      get { return _clickText; }
      set
      {
        SetProperty(ref _clickText, value, () => ClickText);
      }
    }
  }
}
<?xml version="1.0" encoding="utf-8" ?>
<!--

   Copyright 2018 Esri

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

   See the License for the specific language governing permissions and
   limitations under the License.

-->
<ArcGIS defaultAssembly="Examples.dll" defaultNamespace="Examples" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
  <AddInInfo id="{40c18dbd-a8ac-46a1-93ae-4c3ccc618616}">
    <Name>Examples</Name>
    <Description>Examples</Description>
  </AddInInfo>

  <!--Define the embeddable control in the Config.daml-->
  <categories>
    <updateCategory refID="esri_embeddableControls">
      <insertComponent id="mapTool_EmbeddableControl" className="EmbeddedControlViewModel">
        <content className="EmbeddedControlView" />
      </insertComponent>
    </updateCategory>
  </categories>

</ArcGIS>
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

MapTool Class
MapTool Members