Unable to set owner property for default window used by dialog service #2432
Unanswered
lekhaPateel
asked this question in
WPF
Replies: 1 comment 1 reply
-
Any info? :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Below is the error which says that cannot assign owner property to itself. May I know what would the owner for dialog service?
2021-05-05 09:02:56.5078 MenuBar.Dialogs.DialogWindow 1 MenuBar.Dialogs.DialogWindow..ctor Debug TestPad:Owner before assignment is null
2021-05-05 09:02:56.5078 TestPad.Bootstrapper 1 TestPad.Bootstrapper+<>c.b__8_1 Fatal AppDomain.CurrentDomain.DispatcherUnhandledException Prism.Ioc.ContainerResolutionException: An unexpected error occurred while resolving 'Prism.Services.Dialogs.IDialogWindow' ---> Unity.ResolutionFailedException: Resolution failed with error: Exception has been thrown by the target of an invocation.
For more detailed information run Unity in debug mode: new UnityContainer().AddExtension(new Diagnostic()) ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Cannot set Owner property to itself.
at System.Windows.Window.set_Owner(Window value)
at MenuBar.Dialogs.DialogWindow..ctor()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Unity.Processors.ConstructorProcessor.<>c__DisplayClass16_0.b__0(BuilderContext& c)
at Unity.Processors.MemberProcessor
2.<>c__DisplayClass8_0.<GetResolver>b__0(BuilderContext& c) at Unity.Processors.MemberProcessor
2.<>c__DisplayClass8_0.b__0(BuilderContext& c)at Unity.Processors.MemberProcessor
2.<>c__DisplayClass8_0.<GetResolver>b__0(BuilderContext& c) at Unity.Strategies.BuildPlanStrategy.PreBuildUp(BuilderContext& context) at Unity.UnityContainer.<>c.<.ctor>b__73_1(BuilderContext& context) --- End of inner exception stack trace --- at Unity.UnityContainer.<>c.<.ctor>b__73_1(BuilderContext& context) at Unity.UnityContainer.Unity.IUnityContainer.Resolve(Type type, String name, ResolverOverride[] overrides) at Prism.Unity.UnityContainerExtension.Resolve(Type type, ValueTuple
2[] parameters)--- End of inner exception stack trace ---
at Prism.Unity.UnityContainerExtension.Resolve(Type type, ValueTuple
2[] parameters) at Prism.Ioc.IContainerProviderExtensions.Resolve[T](IContainerProvider provider) at Prism.Services.Dialogs.DialogService.ShowDialogInternal(String name, IDialogParameters parameters, Action
1 callback, Boolean isModal, String windowName)at Prism.Services.Dialogs.DialogService.ShowDialog(String name, IDialogParameters parameters, Action`1 callback)
at RF.Model.OnRFFWUpdateRequest(Object sender, String firmwareVersion)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
2021-05-05 09:02:56.5278 TestPad.Bootstrapper 1 TestPad.Bootstrapper+<>c.b__8_0 Fatal AppDomain.CurrentDomain.UnhandledException Prism.Ioc.ContainerResolutionException: An unexpected error occurred while resolving 'Prism.Services.Dialogs.IDialogWindow' ---> Unity.ResolutionFailedException: Resolution failed with error: Exception has been thrown by the target of an invocation.
For more detailed information run Unity in debug mode: new UnityContainer().AddExtension(new Diagnostic()) ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Cannot set Owner property to itself.
at System.Windows.Window.set_Owner(Window value)
at MenuBar.Dialogs.DialogWindow..ctor()
Beta Was this translation helpful? Give feedback.
All reactions