HandyControl icon indicating copy to clipboard operation
HandyControl copied to clipboard

Dialog 发生错误,在采用MEF模式变成时

Open 64237442 opened this issue 2 years ago • 5 comments

Describe the bug 在做MEF插件开发时,在插件中使用 Dialog 时系统报错: System.StackOverflowException HResult=0x800703E9 Source=<无法计算异常源> StackTrace: [<无法计算异常堆栈跟踪>]

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

Environment (please complete the following information):

  • .net: [e.g. 4.5.2]
  • IDE [e.g. vs2019]
  • Version [e.g. 3.2.0]

Additional context Add any other context about the problem here.

64237442 avatar Aug 09 '21 07:08 64237442

主程序中调用Dialog 是没有问题的。插件中调用 Dialog 发生以上错误。

64237442 avatar Aug 09 '21 07:08 64237442

demo 呢?

NaBian avatar Aug 09 '21 07:08 NaBian

谢谢大佬的快速回复。

刚我在做测试Demo ,发现又没有问题,我再检查一下程序,谢谢。

真不好意思。

打扰您了。

------------------ 原始邮件 ------------------ 发件人: "HandyOrg/HandyControl" @.>; 发送时间: 2021年8月9日(星期一) 下午3:37 @.>; @.@.>; 主题: Re: [HandyOrg/HandyControl] Dialog 发生错误,在采用MEF模式变成时 (#949)

demo 呢?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

64237442 avatar Aug 09 '21 08:08 64237442

大佬好, 下面的代码测试无效果。谢谢,Issue 提过了, 这是我参考上面的回答处理的,也是不行。

pls use this method: Dialog.Show(new yourcontrol(), "custom token, anything you want, also need to set the same token for the parent container, just like Growl") { Thread.Sleep(5000); Dispatcher.Invoke(() => { dialog.Close(); }); }); '>var dialog = Dialog.Show(new UserControl1(), "123"); Task.Run(() => { Thread.Sleep(5000); Dispatcher.Invoke(() => { dialog.Close(); }); }); '><Window x:Class="WpfApp1.MainWindow" hc:Dialog.Token="123" ...> <Grid> </Grid> </Window>

------------------ 原始邮件 ------------------ 发件人: "HandyOrg/HandyControl" @.>; 发送时间: 2021年8月9日(星期一) 下午3:37 @.>; @.@.>; 主题: Re: [HandyOrg/HandyControl] Dialog 发生错误,在采用MEF模式变成时 (#949)

demo 呢?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

64237442 avatar Aug 12 '21 06:08 64237442

提供的信息还是太少啦~~~

NaBian avatar Dec 03 '21 05:12 NaBian