Get value from Modal Window in WPF
I have a problem in WPF. I have window which should be displayed as modal window. It has three buttons and returns enum value(has public property of MyEnum type). Two buttons should return enum value as result from window without closing it. Third button should close开发者_StackOverflow社区 window. How can I achieve returning value from modal window without closing it?
regards
You could have your window fire an event when the 'non closing' buttons are clicked. Or, you can give the window an Action or Func to use when the buttons are clicked.
精彩评论