开发者

Get value from Modal Window in WPF

开发者 https://www.devze.com 2023-02-15 08:12 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消