Open pharring opened 5 years ago
I thought it would not be possible easily; maybe show a message banner that the setting is found in Fonts & Colors (and then show a link to open that dialog)?
Yes, we could use an InfoBar for this. Possibly in addition to navigating to Fonts&Colors for you (presumably we have to show the infobar asynchronously before bringing up the modal dialog).
Implementation notes to self:
SVsInfoBarUIFactory/IVsInfoBarUIFactory __VSSPROPID7.VSSPROPID_MainWindowInfoBarHost MPF has low-level helper classes: InfobarModel, InfobarHyperlink (I wish there was a simple MessageBox-like API for this)
💠That doesn't seem like a good use of the gold bar (IVsInfoBarUIFactory). It's more often used for notifying users about errors that occur.
Thanks, @sharwell I found https://docs.microsoft.com/visualstudio/extensibility/ux-guidelines/notifications-and-progress-for-visual-studio#appropriate-uses-for-an-infobar which says
"Don't ... Use an infobar in place of a modal dialog."
If showing a modal dialog is preferable, then we can show a message box that says "Select 'Guideline' from the list in the next dialog. [OK][Cancel]" and, when you click 'OK', it navigates to the Fonts&Colors page.
I can imagine that being a bit clunky, but is that what we want?
@pharring I think this feature request is more about having different colors for each guideline. This is e.g. useful if you work on multiple projects with different maximum line length standards.
Feedback from the Marketplace:
I believe I know how to make "Guideline Color..." navigate to the "Fonts and Colors" page, the trouble is I can't make it scroll to the "Guideline" setting. That would require some tricky/fragile automation.