Matt Peters
Matt Peters

Reputation: 1201

How to have no/one window title and have a different title for the task bar?

Windows Explorer in Windows 7, and maybe Vista too (can't rememmber), does not have a title in the window. but does have a title (some text) in the taskbar.

Is this possible to reproduce in C# (wpf or winforms)? either through the framework or introp.

I want to have a window that says "Options" in the taskbar but the window itself doesn't have a title.

Upvotes: 3

Views: 820

Answers (4)

Nir
Nir

Reputation: 29604

look at http://blogs.msdn.com/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx for the section titled "Vista Explorer – Removing redundant information from the title bar"

Upvotes: 2

Specter
Specter

Reputation:

Have you noticed a Property of the WPF Window:

ShowInTaskbar: Gets or sets a value that indicates whether the window has a task bar button. This is a dependency property.

I think this may be helpful. You can set WindowStyle Property to "None" with the ShowInTaskbar Property set to "True".

Upvotes: 0

Chris Morley
Chris Morley

Reputation: 2426

Simply add the following attribute to the Windows element in your .xaml file

WindowStyle="None"

Side notes: Task Manager can have a title bar or not have a title bar, depending on what mode you have it in; double click on the margin to toggle the mode. Also note, the quickest note to bring up Task Manager is Ctrl+Shift+Esc. Also check out the BorderThickness and WindowsState attributes of the Window element.

Credit to the Particle Effects Example in WPF MSDN docs.

Upvotes: 0

Tormod Fjeldskår
Tormod Fjeldskår

Reputation: 6002

MSDN has a nice article called Custom Window Frame Using DWM which discusses the things you can do with the window frame using the DWM of Vista and Windows 7. In particular, the Removing the Standard Frame section should be relevant for your case.

Upvotes: 6

Related Questions