Beispiel #1
0
        Result IExternalCommand.Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            var dpid = new DockablePaneId(DockablePaneIdentifierManager.GetPanelIdentifier());
            var dp   = commandData.Application.GetDockablePane(dpid);

            dp.Show();

            return(Result.Succeeded);
        }
Beispiel #2
0
        public Result Register(UIApplication application)
        {
            try
            {
                var data = new DockablePaneProviderData();
                var pane = new DockablePaneView();
                data.FrameworkElement = pane as FrameworkElement;

                var dpid = new DockablePaneId(DockablePaneIdentifierManager.GetPanelIdentifier());
                application.RegisterDockablePane(dpid, "Pane", pane as IDockablePaneProvider);
                return(Result.Succeeded);
            }

            catch (Exception ex)
            {
                Debug.WriteLine(ex);
                return(Result.Failed);
            }
        }