SetContent() public method

Called by package when creating a new tool window to set window content and pass on a Package ref
public SetContent ( System.Windows.Controls.UserControl userControl ) : void
userControl System.Windows.Controls.UserControl
return void
Esempio n. 1
0
        internal void SearchContent(BaseToolWindow toolWindow)
        {
            var availableControls = ExtractFromRepository(VSTalkPackage.VSTalkCore.ControlsRepository);
            foreach (var hostedControl in availableControls)
            {
                var window = _package.FindToolWindow(typeof(BaseToolWindow),
                    Math.Abs(hostedControl.GetType().ToString().GetHashCode()),
                    false);

                if (window == toolWindow)
                {
                    toolWindow.SetContent(hostedControl);
                    return;
                }
            }
        }
Esempio n. 2
0
        internal void SearchContent(BaseToolWindow toolWindow)
        {
            var availableControls = ExtractFromRepository(VSTalkPackage.VSTalkCore.ControlsRepository);

            foreach (var hostedControl in availableControls)
            {
                var window = _package.FindToolWindow(typeof(BaseToolWindow),
                                                     Math.Abs(hostedControl.GetType().ToString().GetHashCode()),
                                                     false);

                if (window == toolWindow)
                {
                    toolWindow.SetContent(hostedControl);
                    return;
                }
            }
        }