Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
Im building a WPF Windows Application. This is running with a Ribbon Toolbar - so its affectively a Ribbon Window

I have the Window configured with a title of "Test Window" at present

The title is left aligned in the Window Bar

Does anyone know of a way I can center the window title text? Like Office 2010 for example...

I guess there is probably a nasty way of programatically inserting spaces into the Title value before the actual text - which is nasty if the User resizes the window

Anyone know of ideas ?

Greatly appreciate your help,

Cheers,
Dan
Posted

I haven't looked all the way through this[^] but it has stuff similar to what you want to do.

Have a play. :)
 
Share this answer
 
You should remember, a Window in WPF control is composed of GDI portion (which includes the Title bar, outer boundary etc) and the WPF portion in the middle.

If you are dealing with Ribbon control, generally you need to disable the Title bar and recreate the title of your own.

something like this :
http://pavanpodila.spaces.live.com/blog/cns!9C9E888164859398!345.entry[^]

To know about Ribbon you can go through :
http://www.abhisheksur.com/2010/08/introducing-ribbon-ui-control-for-wpf.html[^]
:rose:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900