The property 'DpiChanged' doesn't exist on System.Windows.Window

Aperta
#88 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
desktop, tooling

Direzione di ricerca

Inizia da ICSharpCode.WpfDesign.XamlDom.XamlObject.FindOrCreateProperty e segui il percorso delle chiamate di PropertyGrid.Reload descritto nello stack trace. Riproduci lo scenario segnalato del designer WPF e conferma che una proprietà DpiChanged mancante non termina più il workbench.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi,

I am using SD in an Autodesk software called Revit, and I am experiencing this error:

SharpDevelop Version : 4.2.0.8783-27231549
.NET Version : 4.0.30319.42000
OS Version : Microsoft Windows NT 6.2.9200.0
Current culture : Invariant Language (Invariant Country) ()
Current UI language : en
Running as 64 bit process
Working Set Memory : 389192kb
GC Heap Memory : 195512kb

Unhandled exception terminated the workbench
Exception thrown:
System.ArgumentException: The property 'DpiChanged' doesn't exist on System.Windows.Window
Parameter name: propertyName
at ICSharpCode.WpfDesign.XamlDom.XamlObject.FindOrCreateProperty(String propertyName)
at ICSharpCode.WpfDesign.Designer.Xaml.XamlModelPropertyCollection.GetProperty(String name)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.<>c__DisplayClass4.b__3(DesignItem item)
at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.AddNode(MemberDescriptor md)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.Reload()
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)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
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)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at ICSharpCode.SharpDevelop.Commands.WorkbenchStartup.Run(IList`1 fileList)
at ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbenchInternal(Object settings)

---- Recent log messages:
09:06:53.857 [19] DEBUG - Removing part C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\Window1.xaml from compound class WPFs.Window1
09:06:53.857 [19] DEBUG - Second-to-last part removed (old part count = 2), overwriting compound with last part
09:06:53.857 [19] DEBUG - Adding existing class Window1 from Window1.xaml
09:06:53.857 [19] DEBUG - Creating compound for WPFs.Window1
09:06:53.858 [SDmain] DEBUG - ParseInformationUpdated C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\Window1.xaml new!=null:True
09:06:54.638 [SDmain] DEBUG - Removing part C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\Window1.xaml from compound class WPFs.Window1
09:06:54.638 [SDmain] DEBUG - Second-to-last part removed (old part count = 2), overwriting compound with last part
09:06:54.638 [SDmain] DEBUG - Adding existing class Window1 from Window1.xaml
09:06:54.638 [SDmain] DEBUG - Creating compound for WPFs.Window1
09:06:54.639 [SDmain] DEBUG - Removing part C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\Window1.xaml from compound class WPFs.Window1
09:06:54.639 [SDmain] DEBUG - Second-to-last part removed (old part count = 2), overwriting compound with last part
09:06:54.639 [SDmain] DEBUG - Adding existing class Window1 from Window1.xaml
09:06:54.639 [SDmain] DEBUG - Creating compound for WPFs.Window1
09:06:54.680 [SDmain] DEBUG - TypeResolutionService: AssemblyResolveEventHandler: ICSharpCode.WpfDesign.AddIn.resources, Version=4.2.0.8783, Culture=en, PublicKeyToken=null
09:06:54.680 [SDmain] DEBUG - TypeResolutionService: AssemblyResolveEventHandler: ICSharpCode.WpfDesign.AddIn.resources, Version=4.2.0.8783, Culture=en, PublicKeyToken=null
09:06:54.687 [SDmain] DEBUG - TypeResolutionService: AssemblyResolveEventHandler: ICSharpCode.WpfDesign.resources, Version=4.2.0.8783, Culture=en, PublicKeyToken=f829da5c02be14ee
09:06:54.687 [SDmain] DEBUG - TypeResolutionService: AssemblyResolveEventHandler: ICSharpCode.WpfDesign.resources, Version=4.2.0.8783, Culture=en, PublicKeyToken=f829da5c02be14ee
09:06:54.816 [SDmain] INFO - Unloading services...
09:06:54.816 [SDmain] INFO - CurrentProject changed to null
09:06:54.821 [SDmain] DEBUG - Removing part C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\ThisApplication.cs from compound class WPFs.ThisApplication
09:06:54.821 [SDmain] DEBUG - Second-to-last part removed (old part count = 2), overwriting compound with last part
09:06:54.821 [SDmain] DEBUG - Removing part C:\ProgramData\Autodesk\Revit\Macros\2023\Revit\AppHookup\WPFs\Source\WPFs\Window1.xaml from compound class WPFs.Window1
09:06:54.821 [SDmain] DEBUG - Second-to-last part removed (old part count = 2), overwriting compound with last part
09:06:54.859 [SDmain] INFO - Finished running workbench.
09:06:54.860 [SDmain] FATAL - System.ArgumentException: The property 'DpiChanged' doesn't exist on System.Windows.Window
Parameter name: propertyName
at ICSharpCode.WpfDesign.XamlDom.XamlObject.FindOrCreateProperty(String propertyName)
at ICSharpCode.WpfDesign.Designer.Xaml.XamlModelPropertyCollection.GetProperty(String name)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.<>c__DisplayClass4.b__3(DesignItem item)
at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.AddNode(MemberDescriptor md)
at ICSharpCode.WpfDesign.Designer.PropertyGrid.PropertyGrid.Reload()
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)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
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)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at ICSharpCode.SharpDevelop.Commands.WorkbenchStartup.Run(IList`1 fileList)
at ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbenchInternal(Object settings)

---- Post-error application state information:
Installed 3rd party AddIns: [SharpDevelop 4.2.0.8783], [CodeAnalysis 0.0.0.0], [SourceAnalysis 0.0.0.0], [Unit Testing Addin 0.0.0.0], [C# Binding 0.0.0.0], [Python Binding 0.0.0.0], [Ruby Binding 0.0.0.0], [VB .NET Binding 0.0.0.0], [XAML binding 0.0.0.0], [Debugger 0.0.0.0], [AvalonEdit.AddIn 0.0.0.0], [Class Diagram 0.0.0.0], [Data Addin 0.0.0.0], [ILSpyAddIn 0.0.0.0], [Forms Designer 0.0.0.0], [HexEditor 0.0.0.0], [IconViewerAddIn 0.0.0.0], [Resource Editor 0.0.0.0], [WPF Designer AddIn 0.0.0.0], [XML Editor 0.0.0.0], [AddInManager 0.0.0.0], [Microsoft Help System v1.0], [PInvoke Add-in 0.0.0.0], [Regular expressions toolkit 0.0.0.0], [Hornung.ResourceToolkit 0.0.0.0], [Search & Replace 0.0.0.0], [SharpRefactoring 0.0.0.0]
ProjectService.OpenSolution:
ProjectService.CurrentProject:

Regards,

Lingua principale
C#
Stelle
1.1k
Fork
281
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di icsharpcode/WpfDesigner

Tutte le issue di icsharpcode/WpfDesigner

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.