private void addExtensionMapBehavior()
        {
            if (mapBehaviorConfigControl == null)
            {
                mapBehaviorConfigControl            = new MapBehaviorConfigControl();
                mapBehaviorConfigControl.OkClicked += (o, e) =>
                {
                    addRemoveMapBehavior(mapBehaviorConfigControl.ExtensionBehavior);

                    if (View.Instance != null && View.Instance.ExtensionBehaviors != null &&
                        !View.Instance.ExtensionBehaviors.Contains(mapBehaviorConfigControl.ExtensionBehavior))
                    {
                        View.Instance.ExtensionBehaviors.Add(mapBehaviorConfigControl.ExtensionBehavior);
                    }

                    MapApplication.Current.HideWindow(mapBehaviorConfigControl);
                };
                mapBehaviorConfigControl.CancelClicked += (o, e) =>
                {
                    MapApplication.Current.HideWindow(mapBehaviorConfigControl);
                };
            }
            mapBehaviorConfigControl.ExtensionBehavior       = null;
            mapBehaviorConfigControl.TypeSelectionVisibility = Visibility.Visible;

            WindowType windowType = MapApplication.Current.IsEditMode ? WindowType.DesignTimeFloating :
                                    WindowType.Floating;

            MapApplication.Current.ShowWindow(ESRI.ArcGIS.Mapping.Controls.Resources.Strings.AddBehavior,
                                              mapBehaviorConfigControl, false, null, null, windowType);
        }
        private void addExtensionMapBehavior()
        {
            if (mapBehaviorConfigControl == null)
            {
                mapBehaviorConfigControl = new MapBehaviorConfigControl();
                mapBehaviorConfigControl.OkClicked += (o, e) =>
                {
                    addRemoveMapBehavior(mapBehaviorConfigControl.ExtensionBehavior);

                    if (View.Instance != null && View.Instance.ExtensionBehaviors != null &&
                            !View.Instance.ExtensionBehaviors.Contains(mapBehaviorConfigControl.ExtensionBehavior))
                        View.Instance.ExtensionBehaviors.Add(mapBehaviorConfigControl.ExtensionBehavior);

                    MapApplication.Current.HideWindow(mapBehaviorConfigControl);
                };
                mapBehaviorConfigControl.CancelClicked += (o, e) =>
                {
                    MapApplication.Current.HideWindow(mapBehaviorConfigControl);
                };
            }
            mapBehaviorConfigControl.ExtensionBehavior = null;
            mapBehaviorConfigControl.TypeSelectionVisibility = Visibility.Visible;

            WindowType windowType = MapApplication.Current.IsEditMode ? WindowType.DesignTimeFloating : 
                WindowType.Floating;
			MapApplication.Current.ShowWindow(ESRI.ArcGIS.Mapping.Controls.Resources.Strings.AddBehavior, 
                mapBehaviorConfigControl, false, null, null, windowType);
        }