Thank you for testing your code the way shown in my comment.
So, it confirmed that the value for the
Window.Title
was calculated correctly, but is later overwritten. You can make sure that the new value is assigned and rendered, if you do it on the later step of the window life cycle, when its context is already rendered, right before is is first shown. One of the ways to achieve that is to override the virtual method
System.Windows.Window.OnContentRendered
and move your assignment there. Please see:
http://msdn.microsoft.com/en-us/library/system.windows.window.oncontentrendered.aspx[
^].
There are many situations where you need to do "last touches" to a window; and this way is probably the easiest.
—SA