0

I know that we can't use messageBox in xaml. But..Can we have a custome "Message box user control"...with a view model..which is having following properties : Message, Trigger (to popup), Icon ???

Relativity
  • 6,690
  • 22
  • 78
  • 128

1 Answers1

1

sure you can do this. just create a window(maybe a viewmodel too if needed) with stuff and properties you want your messagebox look like. then create a ICustomMessageBoxService interface and implementation which you can use in your viewmodels to show your CustomMessageBox.

look here. there is an example for a custom dialog service. you can easily customize it for your messageboxservice.

Community
  • 1
  • 1
blindmeis
  • 22,175
  • 7
  • 55
  • 74