ArcGIS Desktop Add-in

3634
0
03-05-2015 09:44 AM
RaoBase
New Contributor III

Hi all I am using ArcGIS 10.2 and creating an Arcmap addin dockable window

The UI is a user control containing a number of .net controls.

 

(see code  below) based on

Geospatial Scott: How To Get an ArcGIS Add-in Dockable Window

 

This works. However I would like to further do the following

 

1. Prevent user from resizing the user control

2. Make the user control always floating, and not dockable

 

Is the above feasible?

 

 

User control code:

 

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Drawing;

using System.Data;

using System.Linq;

using System.Text;

using System.Windows.Forms;

 

namespace ArcGIS_Addins

{

    public partial class ucSearchAddress : UserControl

    {

        public ucSearchAddress(object hook)

        {

            InitializeComponent();

            this.Hook = hook;

        }

        /// <summary>

        /// Host object of the dockable window

        /// </summary>

        private object Hook

        {

            get;

            set;

        }

 

        /// <summary>

        /// Implementation class of the dockable window add-in. It is responsible for

        /// creating and disposing the user interface class of the dockable window.

        /// </summary>

        public class AddinImpl : ESRI.ArcGIS.Desktop.AddIns.DockableWindow

        {

            private ucSearchAddress m_windowUI;

           

            public AddinImpl()

            {

            }

            protected override IntPtr OnCreateChild()

            {

                m_windowUI = new ucSearchAddress(this.Hook);

                return m_windowUI.Handle;

            }

            protected override void Dispose(bool disposing)

            {

                if (m_windowUI != null)

                    m_windowUI.Dispose(disposing);

                base.Dispose(disposing);

            }           

        }      

    }

}

0 Kudos
0 Replies