Is there a concept of a master page (like in asp.net) for WPF?

asunrey picture asunrey · Mar 19, 2011 · Viewed 9.8k times · Source

I've started a WPF (web-based) application and it has multiple pages. I want to implement the concept of a Master page in WPF, so that when I make changes in the design/layout of one page then all the others pages will follow suit without all the copy and paste.

Answer

Marcote picture Marcote · Mar 19, 2011

I don't think the concept of Master Page is valid in WPF basically because there are no pages. In WPF exists styles, templates and DataTemplates. Not only that, using the DockPanel and other containers you can achieve most of the functionality provided by ASP.NET Master Pages.

In any case, if you still the need of the master pages, I suggest check this article: http://www.codeproject.com/KB/WPF/WPFMasterPageControl.aspx

HTH