I would like to have a reusable window in my desktop application that could potentially have different xamls attachments. Because I would like all my windows to have the same look (I have a great title bar and close button, etc.)
For example, I would like to have a message in it (ok / cancel / string). I would like it to be used to host a form, etc.
Currently I have:
MyWindow.xaml / cs (this is a window)
MyMessageBox.xaml / cs (this is a user control)
MyForm.xaml / cs (this is a user control)
So what is the best way to implement this. Did I just put ContentPresenter in MyWindow, and then somehow “inject” other xamls into it? Do I need other controls to inherit from the base window?
I'm just looking for feedback on the best way to do what I'm trying to do. Thanks
source
share