I have several wpf pages with update/delete/add buttons. I want to display to the user messages like ‘successful delete’, etc. How can I best implement this so the message is defined in a single place (similar to an asp.net master page) and I can update this message from anywhere?
I have several wpf pages with update/delete/add buttons. I want to display to the
Share
You may want to consider doing a publish/subscribe (‘Observer’ pattern) — define a ‘status changed’ event on a base page, and create a custom control that sets up a delegate and event handler to listen for status updates.
Then you could drop the custom control on any page that inherits from the base, and it would automatically listen for and display status messages whenever the event is fired.
Edit: I put together a sample implementation of this pattern and published a blog post walking through the code.