System.Runtime.InteropServices.COMException thrown when setting Shadow via data binding on Windows
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 296
Description
### Description
When using data binding to set the Shadow property on a GraphicsView control in .NET MAUI 9 applications running on Windows (WinUI), a System.Runtime.InteropServices.COMException is thrown. This occurs particularly when using MVVM pattern with INotifyPropertyChanged.
### Steps to Reproduce
- Launch the application on Windows. [GraphicsViewShadowIssue.zip](https://github.com/user-attachments/files/21383051/GraphicsViewShadowIssue.zip)
- Trigger shadow property updates through UI interaction (e.g., input fields, buttons).
- Observe the exception
Expected Behavior:
- Shadow properties should update smoothly via data binding without exceptions
- GraphicsView should reflect shadow changes immediately
Actual Behavior:
- System.Runtime.InteropServices.COMException is thrown.
### Link to public reproduction project repository
_No response_
### Version with bug
9.0.90 SR9
### Is this a regression from previous behavior?
Not sure, did not test other versions
### Last version that worked well
Unknown/Other
### Affected platforms
Windows
### Affected platform versions
_No response_
### Did you find any workaround?
_No response_
### Relevant log output
```shell
```
Contributor guide
Research direction
Start with the attached GraphicsViewShadowIssue.zip reproduction and run it on Windows with .NET MAUI 9.0.90 SR9. Trigger Shadow updates through the input fields or buttons using data binding and inspect the GraphicsView Shadow path when the COMException occurs; done means updates complete without exceptions and the shadow changes are reflected immediately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100