예제 #1
0
        /// <summary>
        /// Creates a LibraryViewController.
        /// </summary>
        /// <param name="dynamoView">DynamoView hosting library component</param>
        /// <param name="commandExecutive">Command executive to run dynamo commands</param>
        internal LibraryViewController(Window dynamoView, ICommandExecutive commandExecutive, LibraryViewCustomization customization)
        {
            this.dynamoWindow  = dynamoView;
            dynamoViewModel    = dynamoView.DataContext as DynamoViewModel;
            this.customization = customization;
            libraryViewTooltip = CreateTooltipControl();

            this.commandExecutive = commandExecutive;
            InitializeResourceProviders(dynamoViewModel.Model, customization);
            dynamoWindow.StateChanged += DynamoWindowStateChanged;
            dynamoWindow.SizeChanged  += DynamoWindow_SizeChanged;
            interop = new scriptingObject(this);
        }
예제 #2
0
        private FloatingLibraryTooltipPopup CreateTooltipControl()
        {
            var sidebarGrid = dynamoWindow.FindName("sidebarGrid") as Grid;

            var tooltipPopup = new FloatingLibraryTooltipPopup(200)
            {
                Name               = "libraryToolTipPopup",
                StaysOpen          = true,
                AllowsTransparency = true,
                PlacementTarget    = sidebarGrid
            };

            sidebarGrid.Children.Add(tooltipPopup);

            return(tooltipPopup);
        }