locked
Tool Window Context Menu Coloring RRS feed

  • Question

  • Hi
    In my VS Package I have a a tool window with a context menu (ToolStripItem class) in it. If I open this context menu then the background color of the images is blue and the selection is yellow.
    If I open the context menu of any standard Visual Studio Window (for example Callstack Window), then the context menu there has a grey image background and the selection is blue.
    Well since I integrate into VS I would like the same style!
    I saw several threads how to customize my context menu, but I can't believe that it is so difficult to get the standard behavior from Visual Studio!? I am already confused that I don't get the VS style by default (I haven't changed anything to the ToolStripItem coloring). In my eyes this is a bug...
    Anyway, how do I change this context menu style to VS standard?
    Regards,
    Belkar
    Wednesday, March 18, 2009 12:17 PM

Answers

  • In my experience, you can fake the coloring of the ToolStrip related classes but the results you get are extremely OS/theme specific and in some cases won't look exactly correct.

    You should use the menus and commandbars of Visual Studio by defining your commands in a .ctc file (VS2005 VSK) or .vsct file (VS2008 SDK).  That way, you will be using the same menus and toolbars as VS and they will look exactly the same.
    • Marked as answer by Bernd-12345 Wednesday, March 18, 2009 1:58 PM
    Wednesday, March 18, 2009 1:22 PM

All replies

  • In my experience, you can fake the coloring of the ToolStrip related classes but the results you get are extremely OS/theme specific and in some cases won't look exactly correct.

    You should use the menus and commandbars of Visual Studio by defining your commands in a .ctc file (VS2005 VSK) or .vsct file (VS2008 SDK).  That way, you will be using the same menus and toolbars as VS and they will look exactly the same.
    • Marked as answer by Bernd-12345 Wednesday, March 18, 2009 1:58 PM
    Wednesday, March 18, 2009 1:22 PM
  •  CTS (or VSCT) is unfortunatly not very flexible and I need to rework some of our VS Package framework. Anyway this sounds quite reasonable.
    Thx for the fast response,
    Belkar
    • Marked as answer by Bernd-12345 Wednesday, March 18, 2009 1:35 PM
    • Unmarked as answer by Bernd-12345 Wednesday, March 18, 2009 1:58 PM
    Wednesday, March 18, 2009 1:34 PM