In my project I have same header & footer for all windows (I have more then 20 wpf windows in this project), Only Content has changed. This is WPF project. If its a asp.
I'm not a 100% sure what do you mean by "all windows", but a good approach would be to have a header
and a footer
UserControls.
You can set them whichever way you want, (text, colors, etc),
and then, in all your windows you could have a grid with 3 elements, stackpanel, dockpanel, whatever you want, which will have the header
, then your content
, and last, your footer
.
Edit: As per comment: Instead of having this:
You can have a UserControls (lets say called HeaderControl
), and then all you need to do is
steps explanation:
Add this to your windown with the rest of the xmlns....
definitions:
xmlns:controls="clr-namespace:WpfApplication1"
Changing the first control from label to our resource:
Instead of
write: