question

DeadStack avatar image
0 Votes"
DeadStack asked ·

FrameworkElement events not supported

I was trying to resolve an issue where 'multiple assemblies with the same identity have been imported" so I removed one of the assemblies (System.Runtime.InteropServices) but then i started getting this message ..

CS1545 Property, indexer, or event 'FrameworkElement.SizeChanged' is not supported by the language; try directly calling accessor methods 'FrameworkElement.add_SizeChanged(SizeChangedEventHandler)' or 'FrameworkElement.remove_SizeChanged(EventRegistrationToken)'

I added System.Runtime.InteropServices back in. But I haven't fixed it. Have I made a mistake and added the wrong nuget package back in?

windows-uwpwindows-uwp-xaml
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DeadStack avatar image
0 Votes"
DeadStack answered ·

I think the package i needed to add was: System.Runtime.InteropServcies.WindowsRuntime

· 5 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, did you solve your problem after adding this package?

0 Votes 0 · ·
DeadStack avatar image DeadStack RichardZhang-MSFT ·

No, I don't think it did strangely. But I can't tell now, because my app is now in a broken state - refusing to run file loading code and throwing an unhelpful exception - System.IO.FileLoadException on code that was never touched and working earlier today. So until i figure that out ...

0 Votes 0 · ·

Hi, if you encounter new problem, you can open a new thread to ask question. If adding this package still doesn't solve your problem, please provide a minimum runnable demo to help us analyze your problem

0 Votes 0 · ·

Hello, has your issue been resolved?

0 Votes 0 · ·
Show more comments